tests/testthat/test-miscellaneous.R
raw| 1 | |
| 2 | # base::sprintf will fail if you pass a format string that's too |
| 3 | # long even if no arguments are used, so renv provides its own |
| 4 | # override that handles this case and then delegates to base::sprintf |
| 5 | # if it's otherwise safe to do so |
| 6 | test_that("long lines and be printed", { |
| 7 | long <- paste(sample(letters, 8192 * 2, TRUE), collapse = "") |
| 8 | expect_equal(sprintf(long), long) |
| 9 | }) |
| 10 | |
| 11 | test_that("unmatched dots cause an error", { |
| 12 | expect_error(snapshot(packaeg = getwd())) |
| 13 | }) |