main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
649 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var test = require('tape');
|
---|
4 | var parse = require('../');
|
---|
5 |
|
---|
6 | test('long opts', function (t) {
|
---|
7 | t.deepEqual(
|
---|
8 | parse(['--bool']),
|
---|
9 | { bool: true, _: [] },
|
---|
10 | 'long boolean'
|
---|
11 | );
|
---|
12 | t.deepEqual(
|
---|
13 | parse(['--pow', 'xixxle']),
|
---|
14 | { pow: 'xixxle', _: [] },
|
---|
15 | 'long capture sp'
|
---|
16 | );
|
---|
17 | t.deepEqual(
|
---|
18 | parse(['--pow=xixxle']),
|
---|
19 | { pow: 'xixxle', _: [] },
|
---|
20 | 'long capture eq'
|
---|
21 | );
|
---|
22 | t.deepEqual(
|
---|
23 | parse(['--host', 'localhost', '--port', '555']),
|
---|
24 | { host: 'localhost', port: 555, _: [] },
|
---|
25 | 'long captures sp'
|
---|
26 | );
|
---|
27 | t.deepEqual(
|
---|
28 | parse(['--host=localhost', '--port=555']),
|
---|
29 | { host: 'localhost', port: 555, _: [] },
|
---|
30 | 'long captures eq'
|
---|
31 | );
|
---|
32 | t.end();
|
---|
33 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.