Add dynamically-generated case-sensitive test.

This commit is contained in:
trestletech
2019-08-06 09:05:02 -05:00
parent dc3ed2f79b
commit b4c6ba6962
3 changed files with 9 additions and 2 deletions

View File

@@ -1 +0,0 @@
TODO: my mac won't let me create `r/` and `R/` so I can't test this.

View File

@@ -0,0 +1 @@
lowerHelper <- 123

View File

@@ -19,6 +19,13 @@ test_that("lower-case helper dir is loaded", {
})
test_that("app with both r/ and R/ prefers R/", {
## App 4 already has a lower-case r/ directory. Try to create an upper.
tryCatch(dir.create("../test-helpers/app4-both/R"),
warning=function(w){testthat::skip("File system is not case-sensitive")})
writeLines("upperHelper <- 'abc'", file.path("../test-helpers/app4-both/R", "upper.R"))
shiny:::loadHelpers("../test-helpers/app4-both")
testthat::skip("Test not yet implemented")
expect_equal(lowerHelper, 123)
expect_equal(upperHelper, "abc")
})