Skip to content

Commit b4e119c

Browse files
committed
no need to deparse
1 parent 4e3aeee commit b4e119c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

R/qenv-eval_code.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ setMethod("eval_code", signature = c("qenv", "character"), function(object, code
5757
message = sprintf(
5858
"%s \n when evaluating qenv code:\n%s",
5959
.ansi_strip(conditionMessage(e)),
60-
deparse1(current_code)
60+
current_code
6161
),
6262
class = c("qenv.error", "try-error", "simpleError"),
6363
trace = unlist(c(object@code, list(current_code)))

tests/testthat/test-qenv_eval_code.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ testthat::test_that("an error when calling eval_code returns a qenv.error object
8888
unname(q$trace),
8989
c("x <- 1", "y <- 2", "z <- w * x")
9090
)
91-
testthat::expect_equal(q$message, "object 'w' not found \n when evaluating qenv code:\n\"z <- w * x\"")
91+
testthat::expect_equal(q$message, "object 'w' not found \n when evaluating qenv code:\nz <- w * x")
9292
})
9393

9494
testthat::test_that(

tests/testthat/test-qenv_get_code.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ testthat::test_that("get_code called with qenv.error returns error with trace in
4343
testthat::expect_equal(class(code), c("validation", "try-error", "simpleError", "error", "condition"))
4444
testthat::expect_equal(
4545
code$message,
46-
"object 'v' not found \n when evaluating qenv code:\n\"w <- v\"\n\ntrace: \n x <- 1\n y <- x\n w <- v\n"
46+
"object 'v' not found \n when evaluating qenv code:\nw <- v\n\ntrace: \n x <- 1\n y <- x\n w <- v\n"
4747
)
4848
})
4949

0 commit comments

Comments
 (0)