diff --git a/tests/09-regression.js b/tests/09-regression.js index e9b8b81..23047a9 100644 --- a/tests/09-regression.js +++ b/tests/09-regression.js @@ -62,4 +62,17 @@ test('Non-Boolean Regression Test', t => { t.ok(d.more === true, 'Recognized boolean flag.') t.ok(d.t === true, 'Treat unrecognized flags separtely from boolean flag. Expected a flag called "t" to exist. Recognized: ' + d.hasOwnProperty('t')) t.end() +}) + +test('Flag values with spaces', t => { + const input = 'test -c "my connection"' + const cfg = { + connection: { + alias: 'c' + } + } + const { data } = new Parser(input, cfg) + + t.expect('my connection', data.connection, 'Extract escaped values with spaces') + t.end() }) \ No newline at end of file