tests/testthat/test-md5.R

test_that("we compute identical hashes for old + new md5 implementations", {

  skip_if(getRversion() < "4.5.0")

  examples <- c("Hello, world!", "a\nb\nc\n", "d\r\ne\r\nf\r\n")
  for (example in examples) {
    old <- renv_md5sum_old(example)
    new <- renv_md5sum_new(example)
    expect_equal(old, new)
  }

})

Try the renv package in your browser

Any scripts or data that you put into this service are public.

renv documentation built on Jan. 16, 2026, 5:08 p.m.