Initial commit
[yaffs-website] / node_modules / mkdirp / node_modules / minimist / test / long.js
1 var test = require('tape');
2 var parse = require('../');
3
4 test('long opts', function (t) {
5     t.deepEqual(
6         parse([ '--bool' ]),
7         { bool : true, _ : [] },
8         'long boolean'
9     );
10     t.deepEqual(
11         parse([ '--pow', 'xixxle' ]),
12         { pow : 'xixxle', _ : [] },
13         'long capture sp'
14     );
15     t.deepEqual(
16         parse([ '--pow=xixxle' ]),
17         { pow : 'xixxle', _ : [] },
18         'long capture eq'
19     );
20     t.deepEqual(
21         parse([ '--host', 'localhost', '--port', '555' ]),
22         { host : 'localhost', port : 555, _ : [] },
23         'long captures sp'
24     );
25     t.deepEqual(
26         parse([ '--host=localhost', '--port=555' ]),
27         { host : 'localhost', port : 555, _ : [] },
28         'long captures eq'
29     );
30     t.end();
31 });