From 2e2b1b23b894fbf0e8d2e4f11b4e3f28ee8ea95e Mon Sep 17 00:00:00 2001 From: riot Date: Mon, 20 Jan 2025 18:40:32 +0200 Subject: [PATCH] chore(test): update test --- test/inlineBrackets.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/inlineBrackets.js b/test/inlineBrackets.js index c4707fb..3292aa4 100644 --- a/test/inlineBrackets.js +++ b/test/inlineBrackets.js @@ -50,7 +50,7 @@ test('inline brackets', function (t) { ) t.deepEqual( - subarg('beep -t [boop -o a.txt -u http://localhost\?q=\[1\] -u http://localhost]'.split(/\s+/)), + subarg('beep -t [boop -o a.txt -u http://localhost\?q=\[1\] -u http://localhost ]'.split(/\s+/)), { _: [ 'beep'], t: { @@ -89,7 +89,7 @@ test('inline brackets', function (t) { ) }); -test.skip('doesnt work', function (t) { +test('doesnt work', function (t) { t.plan(2); /* * expected: @@ -111,11 +111,12 @@ test.skip('doesnt work', function (t) { ) t.deepEqual( - subarg('beep -t [ boop -o a.txt -u [be[ep] ]'.split(/\s+/)), + subarg('beep -t [ boop -o a.txt -u [ be[ep]] ]'.split(/\s+/)), { - /* + /* Same as above - note the context-closing bracket is right next to an inline closing bracket + * If you add a space, it works * expected: - * { _: [ 'beep' ], t: { _: [ 'boop' ], o: 'a.txt', u: { _: [ 'beep' ] } } } + * { _: [ 'beep' ], t: { _: [ 'boop' ], o: 'a.txt', u: { _: [ 'be[ep]' ] } } } * actual: * { _: [ 'beep' ], t: true } */ @@ -124,7 +125,7 @@ test.skip('doesnt work', function (t) { _: [ 'boop' ], o: 'a.txt', u: { - _: [ 'beep' ] + _: [ 'be[ep]' ] } } }