Skip to content

Commit bc95670

Browse files
committed
yabadabadoo
1 parent db68da0 commit bc95670

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

R/utils.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ lang2calls <- function(x) {
5757
#' Obtain warnings or messages from code slot
5858
#'
5959
#' @param object (`qenv`)
60-
#' @param what (``
60+
#' @param what (`"warning"` or `"message"`)
61+
#' @return `character(1)` containing combined message or `NULL` when no warnings/messages
62+
#' @keywords internal
6163
get_warn_message_util <- function(object, what) {
6264
checkmate::matchArg(what, choices = c("warning", "message"))
6365
messages <- lapply(object@code, "attr", what)

man/get_warn_message_util.Rd

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-qenv_eval_code.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ testthat::test_that("comments from the same line are associated with it's call",
150150
)
151151
})
152152

153-
testthat::test_that("alone comments at the end of the source are considered as a separate call", {
153+
testthat::test_that("alone comments at the end of the source are considered as continuation of the last call", {
154154
# todo: should be associated to the last call or be separted?
155-
code <- c("x <- 5", "y <- 10", "# comment")
155+
code <- c("x <- 5\ny <- 10\n# comment")
156156
q <- eval_code(eval_code(qenv(), code[1]), code[2])
157157
testthat::expect_identical(
158-
unlist(q@code)[3],
159-
"# comment"
158+
unlist(q@code)[2],
159+
"y <- 10\n# comment"
160160
)
161161
})
162162

0 commit comments

Comments
 (0)