File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 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")
Original file line number Diff line number Diff 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})
You can’t perform that action at this time.
0 commit comments