1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 00:02:38 +02:00

Try to support older R versions

This commit is contained in:
2018-04-18 15:19:00 +02:00
parent a814d82b4b
commit 4b5530ed64
4 changed files with 57 additions and 32 deletions

View File

@ -14,3 +14,14 @@ test_that("percentages works", {
expect_equal(percent(0.1234), "12.3%")
})
test_that("size format works", {
expect_equal(size_humanreadable(123456), "121 kB")
})
test_that("functions missing in older R versions work", {
expect_equal(strrep("A", 5), "AAAAA")
expect_equal(strrep(c("A", "B"), c(5, 2)), c("AAAAA", "BB"))
expect_equal(trimws(" test "), "test")
expect_equal(trimws(" test ", "l"), "test ")
expect_equal(trimws(" test ", "r"), " test")
})