From 17fb0784594e799ed2ca596af335d422da9f2451 Mon Sep 17 00:00:00 2001
From: Dorchies David <david.dorchies@irstea.fr>
Date: Tue, 21 Apr 2020 17:11:27 +0200
Subject: [PATCH] test: Running examples should be with local = FALSE Otherwise
 variables produced by the example are not available after. Refs #52

---
 tests/testthat/helper_vignettes.R | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testthat/helper_vignettes.R b/tests/testthat/helper_vignettes.R
index 0d274587..1f24851a 100644
--- a/tests/testthat/helper_vignettes.R
+++ b/tests/testthat/helper_vignettes.R
@@ -50,7 +50,7 @@ RunRmdChunks <-  function(fileRmd,
   sTxt = gsub("trace\\s?=\\s?[0-9]+", "trace = 0", sTxt)
   # Add parameters to example calls
   exLines = grep("^example\\(.*\\)", sTxt)
-  sTxt[exLines] = paste0(substr(sTxt[exLines], 1, nchar(sTxt[exLines]) - 1), ", local = TRUE, echo = FALSE, verbose = FALSE, ask = FALSE)")
+  sTxt[exLines] = paste0(substr(sTxt[exLines], 1, nchar(sTxt[exLines]) - 1), ", echo = FALSE, verbose = FALSE, ask = FALSE)")
   # Remove question "Hit <Return> to see next plot"
   sTxt = c("par(ask=F)", sTxt)
   # Write the transformed script
-- 
GitLab