Skip to content

Commit

Permalink
Fix missing test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
r-ash committed Feb 29, 2024
1 parent 6d7f444 commit d2360ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-util.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ test_that("null-or-value works", {
expect_equal(NULL %||% 2, 2)
})


test_that("first_dirname gets the first dir part of the filename", {
expect_equal(
first_dirname(c("test/file/name.txt", "test", ".", "testing/file.txt")),
c("test", "test", ".", "testing"))
})


test_that("sys_which", {
prog <- "a-path-that-does-not-exist"
expect_error(sys_which(prog),
"Did not find 'a-path-that-does-not-exist'")
})

0 comments on commit d2360ea

Please sign in to comment.