@@ -52,11 +52,11 @@ match 1 1 ten 't[a-g]n'
52
52
match 0 0 ten ' t[!a-g]n'
53
53
match 1 1 ton ' t[!a-g]n'
54
54
match 1 1 ton ' t[^a-g]n'
55
- match 1 1 ' a]b' ' a[]]b'
56
- match 1 1 a-b ' a[]-]b'
57
- match 1 1 ' a]b' ' a[]-]b'
58
- match 0 0 aab ' a[]-]b'
59
- match 1 1 aab ' a[]a-]b'
55
+ match 1 x ' a]b' ' a[]]b'
56
+ match 1 x a-b ' a[]-]b'
57
+ match 1 x ' a]b' ' a[]-]b'
58
+ match 0 x aab ' a[]-]b'
59
+ match 1 x aab ' a[]a-]b'
60
60
match 1 1 ' ]' ' ]'
61
61
62
62
# Extended slash-matching features
@@ -67,7 +67,7 @@ match 0 0 'foo/bar' 'foo[/]bar'
67
67
match 0 0 ' foo/bar' ' f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
68
68
match 1 1 ' foo-bar' ' f[^eiu][^eiu][^eiu][^eiu][^eiu]r'
69
69
match 0 0 ' foo' ' **/foo'
70
- match 1 1 ' /foo' ' **/foo'
70
+ match 1 x ' /foo' ' **/foo'
71
71
match 1 0 ' bar/baz/foo' ' **/foo'
72
72
match 0 0 ' bar/baz/foo' ' */foo'
73
73
match 0 0 ' foo/bar/baz' ' **/bar*'
@@ -85,77 +85,77 @@ match 1 0 'deep/foo/bar/baz/x' '**/bar/*/*'
85
85
match 0 0 ' acrt' ' a[c-c]st'
86
86
match 1 1 ' acrt' ' a[c-c]rt'
87
87
match 0 0 ' ]' ' [!]-]'
88
- match 1 1 ' a' ' [!]-]'
88
+ match 1 x ' a' ' [!]-]'
89
89
match 0 0 ' ' ' \'
90
- match 0 0 ' \' ' \'
91
- match 0 0 ' /\' ' */\'
92
- match 1 1 ' /\' ' */\\'
90
+ match 0 x ' \' ' \'
91
+ match 0 x ' /\' ' */\'
92
+ match 1 x ' /\' ' */\\'
93
93
match 1 1 ' foo' ' foo'
94
94
match 1 1 ' @foo' ' @foo'
95
95
match 0 0 ' foo' ' @foo'
96
96
match 1 1 ' [ab]' ' \[ab]'
97
97
match 1 1 ' [ab]' ' [[]ab]'
98
- match 1 1 ' [ab]' ' [[:]ab]'
99
- match 0 0 ' [ab]' ' [[::]ab]'
100
- match 1 1 ' [ab]' ' [[:digit]ab]'
101
- match 1 1 ' [ab]' ' [\[:]ab]'
98
+ match 1 x ' [ab]' ' [[:]ab]'
99
+ match 0 x ' [ab]' ' [[::]ab]'
100
+ match 1 x ' [ab]' ' [[:digit]ab]'
101
+ match 1 x ' [ab]' ' [\[:]ab]'
102
102
match 1 1 ' ?a?b' ' \??\?b'
103
103
match 1 1 ' abc' ' \a\b\c'
104
104
match 0 0 ' foo' ' '
105
105
match 1 0 ' foo/bar/baz/to' ' **/t[o]'
106
106
107
107
# Character class tests
108
- match 1 1 ' a1B' ' [[:alpha:]][[:digit:]][[:upper:]]'
109
- match 0 0 ' a' ' [[:digit:][:upper:][:space:]]'
110
- match 1 1 ' A' ' [[:digit:][:upper:][:space:]]'
111
- match 1 0 ' 1' ' [[:digit:][:upper:][:space:]]'
112
- match 0 0 ' 1' ' [[:digit:][:upper:][:spaci:]]'
113
- match 1 1 ' ' ' [[:digit:][:upper:][:space:]]'
114
- match 0 0 ' .' ' [[:digit:][:upper:][:space:]]'
115
- match 1 1 ' .' ' [[:digit:][:punct:][:space:]]'
108
+ match 1 x ' a1B' ' [[:alpha:]][[:digit:]][[:upper:]]'
109
+ match 0 x ' a' ' [[:digit:][:upper:][:space:]]'
110
+ match 1 x ' A' ' [[:digit:][:upper:][:space:]]'
111
+ match 1 x ' 1' ' [[:digit:][:upper:][:space:]]'
112
+ match 0 x ' 1' ' [[:digit:][:upper:][:spaci:]]'
113
+ match 1 x ' ' ' [[:digit:][:upper:][:space:]]'
114
+ match 0 x ' .' ' [[:digit:][:upper:][:space:]]'
115
+ match 1 x ' .' ' [[:digit:][:punct:][:space:]]'
116
116
match 1 1 ' 5' ' [[:xdigit:]]'
117
117
match 1 1 ' f' ' [[:xdigit:]]'
118
118
match 1 1 ' D' ' [[:xdigit:]]'
119
- match 1 0 ' _' ' [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
120
- match 1 0 ' _' ' [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
121
- match 1 1 ' .' ' [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
122
- match 1 1 ' 5' ' [a-c[:digit:]x-z]'
123
- match 1 1 ' b' ' [a-c[:digit:]x-z]'
124
- match 1 1 ' y' ' [a-c[:digit:]x-z]'
125
- match 0 0 ' q' ' [a-c[:digit:]x-z]'
119
+ match 1 x ' _' ' [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
120
+ match 1 x ' _' ' [[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'
121
+ match 1 x ' .' ' [^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'
122
+ match 1 x ' 5' ' [a-c[:digit:]x-z]'
123
+ match 1 x ' b' ' [a-c[:digit:]x-z]'
124
+ match 1 x ' y' ' [a-c[:digit:]x-z]'
125
+ match 0 x ' q' ' [a-c[:digit:]x-z]'
126
126
127
127
# Additional tests, including some malformed wildmats
128
- match 1 1 ' ]' ' [\\-^]'
128
+ match 1 x ' ]' ' [\\-^]'
129
129
match 0 0 ' [' ' [\\-^]'
130
- match 1 1 ' -' ' [\-_]'
131
- match 1 1 ' ]' ' [\]]'
130
+ match 1 x ' -' ' [\-_]'
131
+ match 1 x ' ]' ' [\]]'
132
132
match 0 0 ' \]' ' [\]]'
133
133
match 0 0 ' \' ' [\]]'
134
134
match 0 0 ' ab' ' a[]b'
135
- match 0 1 ' a[]b' ' a[]b'
136
- match 0 1 ' ab[' ' ab['
135
+ match 0 x ' a[]b' ' a[]b'
136
+ match 0 x ' ab[' ' ab['
137
137
match 0 0 ' ab' ' [!'
138
138
match 0 0 ' ab' ' [-'
139
139
match 1 1 ' -' ' [-]'
140
140
match 0 0 ' -' ' [a-'
141
141
match 0 0 ' -' ' [!a-'
142
- match 1 1 ' -' ' [--A]'
143
- match 1 1 ' 5' ' [--A]'
142
+ match 1 x ' -' ' [--A]'
143
+ match 1 x ' 5' ' [--A]'
144
144
match 1 1 ' ' ' [ --]'
145
145
match 1 1 ' $' ' [ --]'
146
146
match 1 1 ' -' ' [ --]'
147
147
match 0 0 ' 0' ' [ --]'
148
- match 1 1 ' -' ' [---]'
149
- match 1 1 ' -' ' [------]'
148
+ match 1 x ' -' ' [---]'
149
+ match 1 x ' -' ' [------]'
150
150
match 0 0 ' j' ' [a-e-n]'
151
- match 1 1 ' -' ' [a-e-n]'
152
- match 1 1 ' a' ' [!------]'
151
+ match 1 x ' -' ' [a-e-n]'
152
+ match 1 x ' a' ' [!------]'
153
153
match 0 0 ' [' ' []-a]'
154
- match 1 1 ' ^' ' []-a]'
154
+ match 1 x ' ^' ' []-a]'
155
155
match 0 0 ' ^' ' [!]-a]'
156
- match 1 1 ' [' ' [!]-a]'
156
+ match 1 x ' [' ' [!]-a]'
157
157
match 1 1 ' ^' ' [a^bc]'
158
- match 1 1 ' -b]' ' [a-]b]'
158
+ match 1 x ' -b]' ' [a-]b]'
159
159
match 0 0 ' \' ' [\]'
160
160
match 1 1 ' \' ' [\\]'
161
161
match 0 0 ' \' ' [!\\]'
0 commit comments