Skip to content

Commit 2cd54cf

Browse files
committed
Add regression test case from 0.1.x branch
1 parent edbca5d commit 2cd54cf

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

test.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,6 +1675,38 @@ var TESTS = [
16751675
[{ foo: 'bar' }, '/bar?']
16761676
]
16771677
],
1678+
[
1679+
'/:foo\\(:bar?\\)',
1680+
null,
1681+
[
1682+
{
1683+
name: 'foo',
1684+
prefix: '/',
1685+
delimiter: '/',
1686+
optional: false,
1687+
repeat: false,
1688+
pattern: '[^\\/]+?'
1689+
},
1690+
'(',
1691+
{
1692+
name: 'bar',
1693+
prefix: '',
1694+
delimiter: '/',
1695+
optional: true,
1696+
repeat: false,
1697+
pattern: '[^\\/]+?'
1698+
},
1699+
')'
1700+
],
1701+
[
1702+
['/hello(world)', ['/hello(world)', 'hello', 'world']],
1703+
['/hello()', ['/hello()', 'hello', undefined]]
1704+
],
1705+
[
1706+
[{ foo: 'hello', bar: 'world' }, '/hello(world)'],
1707+
[{ foo: 'hello' }, '/hello()']
1708+
]
1709+
],
16781710

16791711
/**
16801712
* Unicode characters.

0 commit comments

Comments
 (0)