process configured short options

This commit is contained in:
josh committed 2013-01-22 13:54:22 -05:00
1 parent 40ecadd056
commit cf049aed2f
2 files changed
+47 -1

No files matched your search

+10
View File
@@ -97,5 +97,15 @@ describe Yawpa do
opts['crazy-option'].should eq('yyy')
args.should eq(['xxx', 'zzz'])
end
it "accepts short options corresponding to a long option" do
options = {
option: {short: 'o'},
}
params = ['-o', 'qqq']
opts, args = Yawpa.parse(params, options)
opts[:option].should be_true
args.should eq(['qqq'])
end
end
end