tests/testthat/test-mountpoint.R

message("\n---- Test mountpoint() ----")
testthat::skip_on_cran()
# testthat::skip_on_travis()
skip_full_tests()

if (Sys.info()["sysname"] == "Linux") { # FIXME test on macOS
  testthat::test_that(
    "Mountpoint home", {
      mp_1 <- mountpoint(".")
      testthat::expect_is(mp_1, "character")
      testthat::expect_true(dir.exists(mp_1))
      testthat::expect_equal(names(attributes(mp_1)), "protocol")
    }
  )
  testthat::test_that(
    "Mountpoint package home", {
      mp_2 <- mountpoint(system.file(package = "sen2r"))
      testthat::expect_is(mp_2, "character")
      testthat::expect_true(dir.exists(mp_2))
      testthat::expect_equal(names(attributes(mp_2)), "protocol")
    }
  )
}

Try the sen2r package in your browser

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

sen2r documentation built on Nov. 10, 2023, 9:08 a.m.