diff options
author | Lee Jarvis <ljjarvis@gmail.com> | 2013-07-25 10:34:53 +0100 |
---|---|---|
committer | Lee Jarvis <ljjarvis@gmail.com> | 2013-07-25 10:34:53 +0100 |
commit | 13d5fdda6b38fc586f1f59eead3a3b5543b40a19 (patch) | |
tree | df8006c79a3c91ae208cd79504c752ae5d78f408 /test | |
parent | 7cfca3fdca18480e06badc68523ea84e1226f0e8 (diff) | |
download | slop-13d5fdda6b38fc586f1f59eead3a3b5543b40a19.tar.gz |
Only raise InvalidOptionError if in strict mode
Diffstat (limited to 'test')
-rw-r--r-- | test/slop_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/slop_test.rb b/test/slop_test.rb index ece71a6..1fd0955 100644 --- a/test/slop_test.rb +++ b/test/slop_test.rb @@ -232,6 +232,11 @@ class SlopTest < TestCase opts = Slop.new :strict => true opts.on :L assert_raises(Slop::InvalidOptionError) { opts.parse %w'-Ly' } + + # but not with no strict mode! + opts = Slop.new + opts.on :L + assert opts.parse %w'-Ly' end test "multiple_switches is enabled by default" do |