aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nomnom/num-vals-fix.diff
blob: 3c4f167919c774a2158783e0cafa1d6380a47675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/test/values.js b/test/values.js
index efad789..7fa1078 100644
--- a/test/values.js
+++ b/test/values.js
@@ -26,6 +26,12 @@ var opts = {
    },
    def2: {
       default: "val1"
+   },
+   "2d": {
+      flag: true
+   },
+   "3d": {
+      abbr: "3"
    }
 }
 
@@ -80,8 +86,12 @@ exports.testDash = function(test) {
 };
 
 exports.testNumbers = function(test) {
-  var options = parser.parseArgs(['sum', '-1', '2.5', '-3.5', '4']);
+  var options = parser.parseArgs(['sum', '-1', '2.5', '-3.5', '4', '--2d', '-3', 'test']);
 
   test.deepEqual(options.list3, ['-1', '2.5', '-3.5', '4']);
+  test.strictEqual(options['2d'], true);
+  test.strictEqual(options['3d'], "test")
   test.done();
 };
+
+