@@ -8,29 +8,34 @@ run_test("use-tidy-description", "DESCRIPTION", suffix = "")
88# ## style-files ####
99
1010# success
11- run_test(" style-files" , suffix = " -success.R" )
11+ run_test(" style-files" ,
12+ suffix = " -success.R" , cmd_args = c(' --cache-root=styler' )
13+ )
1214# fail
13- run_test(" style-files" , suffix = " -fail-changed.R" , error_msg = NA )
15+ run_test(" style-files" ,
16+ suffix = " -fail-changed.R" , cmd_args = c(' --cache-root=styler' ),
17+ error_msg = NA )
1418
15- run_test(" style-files" , suffix = " -fail-parse.R" , error_msg = " unexpected" )
19+ run_test(" style-files" , suffix = " -fail-parse.R" , cmd_args = c(' --cache-root=styler' ),
20+ error_msg = " unexpected" )
1621
1722# success with cmd args
1823run_test(" style-files" ,
1924 file_name = " style-files-cmd" ,
2025 suffix = " -success.R" ,
21- cmd_args = c(" --style_pkg=styler" , " --style_fun=tidyverse_style" )
26+ cmd_args = c(" --style_pkg=styler" , " --style_fun=tidyverse_style" , ' --cache-root=styler ' )
2227)
2328
2429run_test(" style-files" ,
2530 file_name = " style-files-cmd" ,
2631 suffix = " -success.R" ,
27- cmd_args = c(" --scope=spaces" )
32+ cmd_args = c(" --scope=spaces" , ' --cache-root=styler ' )
2833)
2934
3035run_test(" style-files" ,
3136 file_name = " style-files-cmd" ,
3237 suffix = " -success.R" ,
33- cmd_args = c(' --scope="I(\' spaces\' )"' )
38+ cmd_args = c(' --scope="I(\' spaces\' )"' , ' --cache-root=styler ' )
3439)
3540
3641run_test(" style-files" ,
@@ -39,7 +44,8 @@ run_test("style-files",
3944 cmd_args = c(
4045 ' --scope="I(\' spaces\' )"' ,
4146 " --base_indention=0" ,
42- " --include_roxygen_examples=TRUE"
47+ " --include_roxygen_examples=TRUE" ,
48+ ' --cache-root=styler'
4349 )
4450)
4551
@@ -50,35 +56,38 @@ run_test("style-files",
5056 ' --scope="I(\' spaces\' )"' ,
5157 " --base_indention=0" ,
5258 " --include_roxygen_examples=TRUE" ,
53- ' --reindention="specify_reindention(\' #\' )"'
59+ ' --reindention="specify_reindention(\' #\' )"' ,
60+ ' --cache-root=styler'
5461 )
5562)
5663
5764run_test(" style-files" ,
5865 file_name = " style-files" ,
5966 suffix = " -base-indention-success.R" ,
60- cmd_args = c(" --base_indention=4" )
67+ cmd_args = c(" --base_indention=4" , ' --cache-root=styler ' )
6168)
6269
6370run_test(" style-files" ,
6471 file_name = " style-files" ,
6572 suffix = " -roxygen-success.R" ,
66- cmd_args = c(" --include_roxygen_examples=FALSE" )
73+ cmd_args = c(" --include_roxygen_examples=FALSE" , ' --cache-root=styler ' )
6774)
6875
6976# fail with cmd args
7077run_test(" style-files" ,
7178 file_name = " style-files-cmd" ,
7279 suffix = " -success.R" ,
7380 error_msg = " scope must be one" ,
74- cmd_args = c(" --scope=space" )
81+ cmd_args = c(" --scope=space" , ' --cache-root=styler ' )
7582)
7683
7784run_test(" style-files" ,
7885 file_name = " style-files-cmd" ,
7986 suffix = " -fail.R" ,
8087 error_msg = NA ,
81- cmd_args = c(" --style_pkg=styler" , " --style_fun=tidyverse_style" )
88+ cmd_args = c(
89+ " --style_pkg=styler" , " --style_fun=tidyverse_style" , ' --cache-root=styler'
90+ )
8291)
8392
8493# ## . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
0 commit comments