tests/testthat/test-md5.R
raw| 1 | |
| 2 | test_that("we compute identical hashes for old + new md5 implementations", { |
| 3 | |
| 4 | skip_if(getRversion() < "4.5.0") |
| 5 | |
| 6 | examples <- c("Hello, world!", "a\nb\nc\n", "d\r\ne\r\nf\r\n") |
| 7 | for (example in examples) { |
| 8 | old <- renv_md5sum_old(example) |
| 9 | new <- renv_md5sum_new(example) |
| 10 | expect_equal(old, new) |
| 11 | } |
| 12 | |
| 13 | }) |