tests/testthat/test-grass-find.R

# tests/testthat/test-grass-find.R
testthat::test_that("findGRASS() validates Unix vs Windows path syntax", {
  # On Unix, Windows-style drive specs must be rejected deterministically.
  if (Sys.info()[["sysname"]] != "Windows") {
    res <- link2GI::findGRASS(searchLocation = "C:/", quiet = TRUE)
    testthat::expect_true(isFALSE(res) || (is.list(res) && isFALSE(res$exist)))
  }
})

Try the link2GI package in your browser

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

link2GI documentation built on Dec. 23, 2025, 9:09 a.m.