diff options
author | Sebastian Ludwig <sebastian@lurado.de> | 2017-05-22 15:40:36 +0300 |
---|---|---|
committer | Sebastian Ludwig <sebastian@lurado.de> | 2017-05-22 15:40:45 +0300 |
commit | 7b599e5f924ade1f54f321beb63c6ae0f3f7458e (patch) | |
tree | 8192cdd9d309e849dcf11dfbbdf26a55cf50eab1 /test | |
parent | 19b53343c690ab247b40f271585ff8171845bb74 (diff) |
Fix #191 by using the parsed boolean value for CLI options, not always `true`.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_cli.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_cli.rb b/test/test_cli.rb index 694eb14..a626da4 100644 --- a/test/test_cli.rb +++ b/test/test_cli.rb @@ -20,11 +20,15 @@ class CLITest < TwineTest def assert_option_consume_all parse_with '--consume-all' assert @options[:consume_all] + parse_with '--no-consume-all' + refute @options[:consume_all] end def assert_option_consume_comments parse_with '--consume-comments' assert @options[:consume_comments] + parse_with '--no-consume-comments' + refute @options[:consume_comments] end def assert_option_developer_language @@ -99,11 +103,15 @@ class CLITest < TwineTest def assert_option_untagged parse_with '--untagged' assert @options[:untagged] + parse_with '--no-untagged' + refute @options[:untagged] end def assert_option_validate parse_with "--validate" assert @options[:validate] + parse_with "--no-validate" + refute @options[:validate] end end @@ -183,6 +191,8 @@ class TestGenerateAllLocalizationFilesCLI < CLITest def test_option_create_folders parse_with '--create-folders' assert @options[:create_folders] + parse_with '--no-create-folders' + refute @options[:create_folders] end def test_option_file_name @@ -394,5 +404,7 @@ class TestValidateTwineFileCLI < CLITest def test_option_pedantic parse "validate-twine-file #{@twine_file_path} --pedantic" assert @options[:pedantic] + parse "validate-twine-file #{@twine_file_path} --no-pedantic" + refute @options[:pedantic] end end |