diff --git a/tests/test-helpers/app4-both/README.txt b/tests/test-helpers/app4-both/README.txt deleted file mode 100644 index fab0992fc..000000000 --- a/tests/test-helpers/app4-both/README.txt +++ /dev/null @@ -1 +0,0 @@ -TODO: my mac won't let me create `r/` and `R/` so I can't test this. diff --git a/tests/test-helpers/app4-both/r/lower.R b/tests/test-helpers/app4-both/r/lower.R new file mode 100644 index 000000000..0da1b4415 --- /dev/null +++ b/tests/test-helpers/app4-both/r/lower.R @@ -0,0 +1 @@ +lowerHelper <- 123 diff --git a/tests/testthat/test-app.R b/tests/testthat/test-app.R index fd45f4513..72205068a 100644 --- a/tests/testthat/test-app.R +++ b/tests/testthat/test-app.R @@ -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") })