@@ -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.
1514Usage:
16- cmdtest [options ] <files>...
15+ cmdtest [--warn_only ] <files>...
1716Options:
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