diff options
author | Thomas Bénéteau <thomas@bitwise.me> | 2017-08-05 22:04:05 +1200 |
---|---|---|
committer | Thomas Bénéteau <thomas@bitwise.me> | 2017-08-05 22:08:38 +1200 |
commit | e52f389dc2ee7f5988b6abfb20651f9edd6b7a26 (patch) | |
tree | 142c0571102f1c1314910958c69f785b7c504ed0 /test/error_test.rb | |
parent | bdd21e885e577ed42459c9afe185ede8e9d25fde (diff) | |
download | slop-e52f389dc2ee7f5988b6abfb20651f9edd6b7a26.tar.gz |
Fix bug preventing '--' being passed as the first argument.
Diffstat (limited to 'test/error_test.rb')
-rw-r--r-- | test/error_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/error_test.rb b/test/error_test.rb index 848e2d5..2f7730b 100644 --- a/test/error_test.rb +++ b/test/error_test.rb @@ -21,6 +21,12 @@ describe Slop::MissingArgument do opts.string "-n", "--name" opts.parse %w(--name) end + + it "does not raise if '--' appears as the first argument" do + opts = Slop::Options.new + opts.string "-n", "--name" + opts.parse %w(-- --name) + end end describe Slop::UnknownOption do |