Skip to content

Commit c525729

Browse files
committed
Add test to get_code with no code on qenv
1 parent 22d94ed commit c525729

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/testthat/test-qenv_get_code.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
pasten <<- function(...) paste(..., collapse = "\n")
22

3+
testthat::test_that("get_code returns empty character if no code", {
4+
expect_identical(get_code(qenv()), "")
5+
})
6+
37
testthat::test_that("get_code returns code (character(1) by default) of qenv object", {
48
q <- qenv()
59
q <- eval_code(q, quote(x <- 1))

0 commit comments

Comments
 (0)