Skip to content

Commit

Permalink
Surround calls in ``
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed Apr 20, 2016
1 parent ca2f8e5 commit 21b51a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ expr_label <- function(x) {
dot_call <- call_new(x[[1]], quote(...))
chr <- paste(deparse(dot_call), collapse = "\n")
}
chr
paste0("`", chr, "`")
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test-expr.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ test_that("converts atomics to strings", {
})

test_that("truncates long calls", {
expect_equal(expr_label({ a + b }), "{\n ...\n}")
expect_equal(expr_label({ a + b }), "`{\n ...\n}`")
})

0 comments on commit 21b51a4

Please sign in to comment.