blob: 2f460206c7111af22717a77d0cb531d7d25b8c94 (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# $OpenBSD: test-patterns.out,v 1.1 2015/06/23 18:03:09 semarie Exp $
string='/page/51'
pattern='^/(%a+)/(%d+)$'
ret=0 num=3
0: /page/51
1: page
2: 51
string='/Apage/51'
pattern='/[^%d][%w%u][^%c]+()[%d]+'
ret=0 num=2
0: /Apage/51
1:
string='/^page/51'
pattern='/^(.a.e)/(.)'
ret=0 num=3
0: /^page/51
1: page
2: 5
string='/page/page-51'
pattern='/(.*)/%1-(%d+)'
ret=0 num=3
0: /page/page-51
1: page
2: 51
string='/page/[51]'
pattern='/page/(%b[])'
ret=0 num=2
0: /page/[51]
1: [51]
string=':-]'
pattern=']+'
ret=0 num=2
0: :-]
1: ]
string=':-)'
pattern='[)]+'
ret=0 num=2
0: :-)
1: )
string='/page/51'
pattern='$^'
ret=-1 num=0
string='1234567890'
pattern='([2-5]-)'
ret=0 num=2
0: 1234567890
1:
string='****'
pattern='^**$'
ret=0 num=2
0: ****
1: ****
string='xxxx'
pattern='^x*$'
ret=0 num=2
0: xxxx
1: xxxx
string='/page/51'
pattern='no-%d-match'
ret=-1 num=0
patterns-tester: str_match: invalid capture index
string='/page/page-51'
pattern='/(.*)/%9-(%d+)'
patterns-tester: str_match: invalid pattern capture
string=':-)'
pattern=')+'
patterns-tester: str_match: unfinished capture
string='/page/51'
pattern='/page/51('
patterns-tester: str_match: malformed pattern (ends with '%%')
string='/page/51'
pattern='/page/51%'
patterns-tester: str_match: malformed pattern (missing ']')
string='/page/51'
pattern='/page/[51'
patterns-tester: str_match: malformed pattern (missing arguments to '%b')
string='/page/(51)'
pattern='/page/%b('
patterns-tester: str_match: too many captures
string='/page/51'
pattern='()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()'
patterns-tester: str_match: missing '[' after '%f' in pattern
string='/page/51'
pattern='/page/%f'
patterns-tester: str_match: missing '[' after '%f' in pattern
string='/page/51'
pattern='/page%f/51'
patterns-tester: str_match: max repetition items
string='q*********************************'
pattern='*************************************q'
patterns-tester: str_match: max repetition items
string='q+++++++++++++++++++++++++++++++++'
pattern='+++++++++++++++++++++++++++++++++++++q'
patterns-tester: str_match: max repetition items
string='q---------------------------------'
pattern='-------------------------------------q'
patterns-tester: str_match: max repetition items
string='q?????????????????????????????????'
pattern='?????????????????????????????????????q'
|