implement posix_order flag

This commit is contained in:
josh committed 2013-01-22 18:09:44 -05:00
1 parent dd4148a3d6
commit 6ae8e62f7b
2 files changed
+16 -1

No files matched your search

+12
View File
@@ -201,5 +201,17 @@ describe Yawpa do
opts[:option].should eq('NEW_VALUE')
args.should be_empty
end
it "ignores options after arguments in posix_order mode" do
options = {
one: {},
two: {},
}
params = ['--one', 'arg', '--two']
opts, args = Yawpa.parse(params, options, posix_order: true)
opts[:one].should be_true
opts[:two].should be_false
args.should eq(['arg', '--two'])
end
end
end