We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48ca5e6 commit 3cc5f86Copy full SHA for 3cc5f86
1 file changed
tests/testthat/test-utils.R
@@ -248,3 +248,16 @@ test_that("as_mcmc.list() works", {
248
"Currently only CmdStanMCMC objects can be converted to mcmc.list"
249
)
250
})
251
+
252
+test_that("get_cmdstan_flags() can be used recursively in `make`", {
253
+ tmp <- withr::local_tempfile()
254
+ writeLines(
255
+ "test:\n\t@Rscript --vanilla -e 'cat(cmdstanr:::get_cmdstan_flags(\"STANCFLAGS\"))'",
256
+ tmp
257
+ )
258
+ nonrecursive_flags <- get_cmdstan_flags("STANCFLAGS")
259
+ recursive_flags <- readLines(textConnection(wsl_compatible_run(
260
+ command = "make", args = c("-f", tmp)
261
+ )$stdout))
262
+ expect_equal(nonrecursive_flags, recursive_flags)
263
+})
0 commit comments