Skip to content

Commit df9b1ed

Browse files
Remove negative from option; add default
1 parent fae0f4b commit df9b1ed

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

R/testing.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ test_collection <- function(test, sub_test = NULL,
4141

4242
out_names <- construct_out(in_names)
4343

44-
if (getOption("styler.test_dir_unwritable")) {
44+
if (getOption("styler.test_dir_writable", TRUE)) {
45+
out_items <- file.path(path, out_names)
46+
in_items <- file.path(path, in_names)
47+
out_trees <- construct_tree(in_items)
48+
} else {
4549
in_items <- file.path(path, in_names)
4650
out_items <- file.path(tempdir(), out_names)
4751
ref_items <- file.path(path, out_names)
4852
file.copy(ref_items, out_items, overwrite = TRUE, copy.mode = FALSE)
4953
out_trees <- file.path(tempdir(), construct_tree(in_names))
50-
} else {
51-
out_items <- file.path(path, out_names)
52-
in_items <- file.path(path, in_names)
53-
out_trees <- construct_tree(in_items)
5454
}
5555

5656
pwalk(list(in_items, out_items, in_names, out_names, out_trees),

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
styler.addins_style_transformer = "styler::tidyverse_style()",
88
styler.ignore_start = "# styler: off",
99
styler.ignore_stop = "# styler: on",
10-
styler.test_dir_unwritable = FALSE
10+
styler.test_dir_writable = TRUE
1111
)
1212
toset <- !(names(op.styler) %in% names(op))
1313
if (any(toset)) options(op.styler[toset])

0 commit comments

Comments
 (0)