Skip to content

Commit 805d3a4

Browse files
lorenzwalthertagvandervelde
authored andcommitted
refactor: No needt o adapt docop tests since new functionality is unrelated to what we were testing there
1 parent b0f60f3 commit 805d3a4

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

tests/testthat/test-docopt.R

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@ test_that("custom docopt interface parses as expected", {
77
c("Another file with spaces.R", "Yet another file with spaces (YAFWS).R", "--warn_only"),
88
c("--warn_only", "Another file with spaces.R"),
99
c("--warn_only", "Another file with spaces.R", "Yet another file with spaces (YAFWS).R"),
10-
c("Another file with spaces.R", "--warn_only", "Yet another file with spaces (YAFWS).R"),
11-
c("--load_package", "Another file with spaces.R", "Yet another file with spaces (YAFWS).R")
10+
c("Another file with spaces.R", "--warn_only", "Yet another file with spaces (YAFWS).R")
1211
)
1312

1413
"Run lintr on R files during a precommit.
1514
Usage:
16-
cmdtest [options] <files>...
15+
cmdtest [--warn_only] <files>...
1716
Options:
18-
--warn_only Placeholder for test.
19-
--load_package Placeholder for test.
17+
--warn_only Placeholder for test.
2018
" -> doc
2119

2220
for (args in args_variants) {
@@ -37,12 +35,5 @@ Options:
3735
expect_false(new_args$warn_only)
3836
expect_false(new_args$`--warn_only`)
3937
}
40-
if ("--load_package" %in% args) {
41-
expect_true(new_args$load_package)
42-
expect_true(new_args$`--load_package`)
43-
} else {
44-
expect_false(new_args$load_package)
45-
expect_false(new_args$`--load_package`)
46-
}
4738
}
4839
})

0 commit comments

Comments
 (0)