@@ -124,28 +124,6 @@ test_that("quarto.quiet options controls echo and overwrite function argument",
124124 })
125125})
126126
127- test_that(" quarto sees same libpaths as main process" , {
128- skip_if_no_quarto()
129- skip_on_cran()
130- qmd <- local_qmd_file(c(" ```{r}" , " #| echo: false" , " .libPaths()" , " ```" ))
131- tmp_lib <- withr :: local_tempdir(" tmp_libpath" )
132- withr :: local_libpaths(tmp_lib , action = " prefix" )
133- withr :: local_dir(dirname(qmd ))
134- out <- " out.md"
135- # .libPaths() is known in Quarto render
136- out <- .render_and_read(qmd , output_format = " gfm" )
137- expect_match(out , basename(tmp_lib ), all = FALSE , fixed = TRUE )
138- # Opting-out globally
139- withr :: with_options(
140- list (quarto.use_libpaths = FALSE ),
141- out <- .render_and_read(qmd , output_format = " gfm" )
142- )
143- expect_no_match(out , basename(tmp_lib ), fixed = TRUE )
144- # Opting-out at command
145- out <- .render_and_read(qmd , output_format = " gfm" , libpaths = NULL )
146- expect_no_match(out , basename(tmp_lib ), fixed = TRUE )
147- })
148-
149127test_that(" quarto_available()" , {
150128 expect_error(
151129 quarto_available(" 1.5" , " 1.4" ),
@@ -184,7 +162,7 @@ test_that("quarto sees same libpaths as main process", {
184162 skip_if_no_quarto()
185163 skip_on_cran()
186164 qmd <- local_qmd_file(c(" ```{r}" , " #| echo: false" , " .libPaths()" , " ```" ))
187- tmp_lib <- withr :: local_tempdir(" tmp_libpath" )
165+ tmp_lib <- withr :: local_tempdir(" tmp_libpath" )
188166 withr :: local_libpaths(tmp_lib , action = " prefix" )
189167 withr :: local_dir(dirname(qmd ))
190168 out <- " out.md"
@@ -193,12 +171,11 @@ test_that("quarto sees same libpaths as main process", {
193171 expect_match(out , basename(tmp_lib ), all = FALSE , fixed = TRUE )
194172 # Opting-out globally
195173 withr :: with_options(
196- list (quarto.use_libpaths = FALSE ),
174+ list (quarto.use_libpaths = FALSE ),
197175 out <- .render_and_read(qmd , output_format = " gfm" )
198176 )
199177 expect_no_match(out , basename(tmp_lib ), fixed = TRUE )
200178 # Opting-out at command
201179 out <- .render_and_read(qmd , output_format = " gfm" , libpaths = NULL )
202180 expect_no_match(out , basename(tmp_lib ), fixed = TRUE )
203-
204- })
181+ })
0 commit comments