process configured short options
This commit is contained in:
1 parent
40ecadd056
commit
cf049aed2f
2 files changed
+47
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user