Skip to content

Commit

Permalink
chore(test): update test
Browse files Browse the repository at this point in the history
  • Loading branch information
xt-riot committed Jan 20, 2025
1 parent c286cde commit 2dc191b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/inlineBrackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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 }
*/
Expand All @@ -124,7 +125,7 @@ test.skip('doesnt work', function (t) {
_: [ 'boop' ],
o: 'a.txt',
u: {
_: [ 'beep' ]
_: [ 'be[ep]' ]
}
}
}
Expand Down

0 comments on commit 2dc191b

Please sign in to comment.