Skip to content

Commit 249e6fe

Browse files
[skip style] [skip vbump] Restyle files
1 parent d278046 commit 249e6fe

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

R/qenv-get_code.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@
8080
#'
8181
#' @examples
8282
#' # retrieve code
83-
#' q <- within(qenv(), {a <- 1; b <- 2})
83+
#' q <- within(qenv(), {
84+
#' a <- 1
85+
#' b <- 2
86+
#' })
8487
#' get_code(q)
8588
#' get_code(q, deparse = FALSE)
8689
#' get_code(q, names = "a")

tests/testthat/test-qenv_get_code.R

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,10 @@ testthat::test_that(
446446
testthat::expect_identical(
447447
get_code(q, names = "classes"),
448448
paste("iris2 <- iris[1:5, ]",
449-
"iris_head <- head(iris)",
450-
"iris3 <- iris_head[1, ]",
451-
"classes <- lapply(iris2, class)",
452-
sep = "\n"
449+
"iris_head <- head(iris)",
450+
"iris3 <- iris_head[1, ]",
451+
"classes <- lapply(iris2, class)",
452+
sep = "\n"
453453
)
454454
)
455455
}
@@ -614,11 +614,11 @@ testthat::test_that("understands $ usage and do not treat rhs of $ as objects (o
614614
testthat::expect_identical(
615615
get_code(q, names = "a"),
616616
paste("x <- data.frame(a = 1:3)",
617-
"a <- data.frame(y = 1:3)",
618-
"a$x <- a$y",
619-
"a$x <- a$x + 2",
620-
"a$x <- x$a",
621-
sep = "\n"
617+
"a <- data.frame(y = 1:3)",
618+
"a$x <- a$y",
619+
"a$x <- a$x + 2",
620+
"a$x <- x$a",
621+
sep = "\n"
622622
)
623623
)
624624
})

0 commit comments

Comments
 (0)