summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNaoki Mizuno <nigorojr@gmail.com>2015-09-08 08:40:29 -0400
committerNaoki Mizuno <nigorojr@gmail.com>2015-09-08 08:42:07 -0400
commitf8012062596783e0e518e3f11d94bb2916a5f84f (patch)
tree06c9f81e297b023bed3485440060d5ac08c0e51e /test
parent380903aa76757fd66dc1b95e193fcc5a5ab7256e (diff)
downloadslop-f8012062596783e0e518e3f11d94bb2916a5f84f.tar.gz
Fix arguments removed with option arguments
See #181.
Diffstat (limited to 'test')
-rw-r--r--test/parser_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parser_test.rb b/test/parser_test.rb
index 85ba7e0..bfc4f7e 100644
--- a/test/parser_test.rb
+++ b/test/parser_test.rb
@@ -66,5 +66,10 @@ describe Slop::Parser do
@parser.parse %w(-v -- --name lee)
assert_equal %w(--name lee), @parser.arguments
end
+
+ it "correctly removes the option argument" do
+ @parser.parse %w(lee --name lee lee)
+ assert_equal %w(lee lee), @parser.arguments
+ end
end
end