We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5605340 commit 3cd6246Copy full SHA for 3cd6246
tests/testthat/test-qenv_eval_code.R
@@ -186,3 +186,10 @@ testthat::test_that("comments passed alone to eval_code that contain @linksto ta
186
"x"
187
)
188
})
189
+
190
+testthat::test_that("keep_output stores the last output of the `code` evaluation in its 'output' attribute", {
191
+ q <- eval_code(qenv(), "a <- 1L;b <-2L;c<- 3L", keep_output = TRUE)
192
+ testthat::expect_identical(attr(q@code[[1]], "output"), NULL)
193
+ testthat::expect_identical(attr(q@code[[2]], "output"), NULL)
194
+ testthat::expect_identical(attr(q@code[[3]], "output"), 3L)
195
+})
0 commit comments