mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-13 09:04:58 -05:00
tests are now passing on symbology
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
# Ensure that the OptionParser handles arguments correctly.
|
||||
|
||||
{OptionParser}: require './../lib/optparse'
|
||||
{OptionParser} = require './../lib/optparse'
|
||||
|
||||
opt: new OptionParser [
|
||||
opt = new OptionParser [
|
||||
['-r', '--required [DIR]', 'desc required']
|
||||
['-o', '--optional', 'desc optional']
|
||||
]
|
||||
|
||||
result: opt.parse ['one', 'two', 'three', '-r', 'dir']
|
||||
result = opt.parse ['one', 'two', 'three', '-r', 'dir']
|
||||
|
||||
ok result.arguments.length is 5
|
||||
ok result.arguments[3] is '-r'
|
||||
|
||||
result: opt.parse ['--optional', '-r', 'folder', 'one', 'two']
|
||||
result = opt.parse ['--optional', '-r', 'folder', 'one', 'two']
|
||||
|
||||
ok result.optional is true
|
||||
ok result.required is 'folder'
|
||||
|
||||
Reference in New Issue
Block a user