about summary refs log tree commit diff
path: root/Test/11glob.ztst
blob: 17c33eb6317aa61317a19ed626015c73c6d36485 (plain) (blame)
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# Tests for globbing

%prep
  globtest () { $ZTST_testdir/../Src/zsh -f $ZTST_srcdir/../Misc/$1 }

%test

  globtest globtests
0:zsh globbing
>0:  [[ foo~ = foo~ ]]
>0:  [[ foo~ = (foo~) ]]
>0:  [[ foo~ = (foo~|) ]]
>0:  [[ foo.c = *.c~boo* ]]
>1:  [[ foo.c = *.c~boo*~foo* ]]
>0:  [[ fofo = (fo#)# ]]
>0:  [[ ffo = (fo#)# ]]
>0:  [[ foooofo = (fo#)# ]]
>0:  [[ foooofof = (fo#)# ]]
>0:  [[ fooofoofofooo = (fo#)# ]]
>1:  [[ foooofof = (fo##)# ]]
>1:  [[ xfoooofof = (fo#)# ]]
>1:  [[ foooofofx = (fo#)# ]]
>0:  [[ ofxoofxo = ((ofo#x)#o)# ]]
>1:  [[ ofooofoofofooo = (fo#)# ]]
>0:  [[ foooxfooxfoxfooox = (fo#x)# ]]
>1:  [[ foooxfooxofoxfooox = (fo#x)# ]]
>0:  [[ foooxfooxfxfooox = (fo#x)# ]]
>0:  [[ ofxoofxo = ((ofo#x)#o)# ]]
>0:  [[ ofoooxoofxo = ((ofo#x)#o)# ]]
>0:  [[ ofoooxoofxoofoooxoofxo = ((ofo#x)#o)# ]]
>0:  [[ ofoooxoofxoofoooxoofxoo = ((ofo#x)#o)# ]]
>1:  [[ ofoooxoofxoofoooxoofxofo = ((ofo#x)#o)# ]]
>0:  [[ ofoooxoofxoofoooxoofxooofxofxo = ((ofo#x)#o)# ]]
>0:  [[ aac = ((a))#a(c) ]]
>0:  [[ ac = ((a))#a(c) ]]
>1:  [[ c = ((a))#a(c) ]]
>0:  [[ aaac = ((a))#a(c) ]]
>1:  [[ baaac = ((a))#a(c) ]]
>0:  [[ abcd = ?(a|b)c#d ]]
>0:  [[ abcd = (ab|ab#)c#d ]]
>0:  [[ acd = (ab|ab#)c#d ]]
>0:  [[ abbcd = (ab|ab#)c#d ]]
>0:  [[ effgz = (bc##d|ef#g?|(h|)i(j|k)) ]]
>0:  [[ efgz = (bc##d|ef#g?|(h|)i(j|k)) ]]
>0:  [[ egz = (bc##d|ef#g?|(h|)i(j|k)) ]]
>0:  [[ egzefffgzbcdij = (bc##d|ef#g?|(h|)i(j|k))# ]]
>1:  [[ egz = (bc##d|ef##g?|(h|)i(j|k)) ]]
>0:  [[ ofoofo = (ofo##)# ]]
>0:  [[ oxfoxoxfox = (oxf(ox)##)# ]]
>1:  [[ oxfoxfox = (oxf(ox)##)# ]]
>0:  [[ ofoofo = (ofo##|f)# ]]
>0:  [[ foofoofo = (foo|f|fo)(f|ofo##)# ]]
>0:  [[ oofooofo = (of|oofo##)# ]]
>0:  [[ fffooofoooooffoofffooofff = (f#o#)# ]]
>1:  [[ fffooofoooooffoofffooofffx = (f#o#)# ]]
>0:  [[ fofoofoofofoo = (fo|foo)# ]]
>0:  [[ foo = ((^x)) ]]
>0:  [[ foo = ((^x)*) ]]
>1:  [[ foo = ((^foo)) ]]
>0:  [[ foo = ((^foo)*) ]]
>0:  [[ foobar = ((^foo)) ]]
>0:  [[ foobar = ((^foo)*) ]]
>1:  [[ foot = z*~*x ]]
>0:  [[ zoot = z*~*x ]]
>1:  [[ foox = z*~*x ]]
>1:  [[ zoox = z*~*x ]]
>0:  [[ moo.cow = (*~*.*).(*~*.*) ]]
>1:  [[ mad.moo.cow = (*~*.*).(*~*.*) ]]
>0:  [[ moo.cow = (^*.*).(^*.*) ]]
>1:  [[ sane.moo.cow = (^*.*).(^*.*) ]]
>1:  [[ mucca.pazza = mu(^c#)?.pa(^z#)? ]]
>1:  [[ _foo~ = _(|*[^~]) ]]
>0:  [[ fff = ((^f)) ]]
>0:  [[ fff = ((^f)#) ]]
>0:  [[ fff = ((^f)##) ]]
>0:  [[ ooo = ((^f)) ]]
>0:  [[ ooo = ((^f)#) ]]
>0:  [[ ooo = ((^f)##) ]]
>0:  [[ foo = ((^f)) ]]
>0:  [[ foo = ((^f)#) ]]
>0:  [[ foo = ((^f)##) ]]
>1:  [[ f = ((^f)) ]]
>1:  [[ f = ((^f)#) ]]
>1:  [[ f = ((^f)##) ]]
>0:  [[ foot = (^z*|*x) ]]
>1:  [[ zoot = (^z*|*x) ]]
>0:  [[ foox = (^z*|*x) ]]
>0:  [[ zoox = (^z*|*x) ]]
>0:  [[ foo = (^foo)# ]]
>1:  [[ foob = (^foo)b* ]]
>0:  [[ foobb = (^foo)b* ]]
>1:  [[ foob = (*~foo)b* ]]
>0:  [[ foobb = (*~foo)b* ]]
>1:  [[ zsh = ^z* ]]
>0:  [[ a%1X = [[:alpha:][:punct:]]#[[:digit:]][^[:lower:]] ]]
>1:  [[ a%1 = [[:alpha:][:punct:]]#[[:digit:]][^[:lower:]] ]]
>0:  [[ [: = [[:]# ]]
>0:  [[ :] = []:]# ]]
>0:  [[ :] = [:]]# ]]
>0:  [[ [ = [[] ]]
>0:  [[ ] = []] ]]
>0:  [[ [] = [^]]] ]]
>0:  [[ fooxx = (#i)FOOXX ]]
>1:  [[ fooxx = (#l)FOOXX ]]
>0:  [[ FOOXX = (#l)fooxx ]]
>1:  [[ fooxx = (#i)FOO(#I)X(#i)X ]]
>0:  [[ fooXx = (#i)FOO(#I)X(#i)X ]]
>0:  [[ fooxx = ((#i)FOOX)x ]]
>1:  [[ fooxx = ((#i)FOOX)X ]]
>1:  [[ BAR = (bar|(#i)foo) ]]
>0:  [[ FOO = (bar|(#i)foo) ]]
>0:  [[ Modules = (#i)*m* ]]
>0:  [[ fooGRUD = (#i)(bar|(#I)foo|(#i)rod)grud ]]
>1:  [[ FOOGRUD = (#i)(bar|(#I)foo|(#i)rod)grud ]]
>0:  [[ readme = (#i)readme~README|readme ]]
>0:  [[ readme = (#i)readme~README|readme~README ]]
>0:  [[ 633 = <1-1000>33 ]]
>0:  [[ 633 = <-1000>33 ]]
>0:  [[ 633 = <1->33 ]]
>0:  [[ 633 = <->33 ]]
>0:  [[ READ.ME = (#ia1)readme ]]
>1:  [[ READ..ME = (#ia1)readme ]]
>0:  [[ README = (#ia1)readm ]]
>0:  [[ READM = (#ia1)readme ]]
>0:  [[ README = (#ia1)eadme ]]
>0:  [[ EADME = (#ia1)readme ]]
>0:  [[ READEM = (#ia1)readme ]]
>1:  [[ ADME = (#ia1)readme ]]
>1:  [[ README = (#ia1)read ]]
>0:  [[ bob = (#a1)[b][b] ]]
>1:  [[ bob = (#a1)[b][b]a ]]
>0:  [[ bob = (#a1)[b]o[b]a ]]
>1:  [[ bob = (#a1)[c]o[b] ]]
>0:  [[ abcd = (#a2)XbcX ]]
>0:  [[ abcd = (#a2)ad ]]
>0:  [[ ad = (#a2)abcd ]]
>0:  [[ abcd = (#a2)bd ]]
>0:  [[ bd = (#a2)abcd ]]
>0:  [[ badc = (#a2)abcd ]]
>0:  [[ adbc = (#a2)abcd ]]
>1:  [[ dcba = (#a2)abcd ]]
>0:  [[ dcba = (#a3)abcd ]]
>0:  [[ aabaXaaabY = (#a1)(a#b)#Y ]]
>0:  [[ aabaXaaabY = (#a1)(a#b)(a#b)Y ]]
>0:  [[ aaXaaaaabY = (#a1)(a#b)(a#b)Y ]]
>0:  [[ aaaXaaabY = (#a1)(a##b)##Y ]]
>0:  [[ aaaXbaabY = (#a1)(a##b)##Y ]]
>1:  [[ read.me = (#ia1)README~READ.ME ]]
>0:  [[ read.me = (#ia1)README~READ_ME ]]
>1:  [[ read.me = (#ia1)README~(#a1)READ_ME ]]
>0 tests failed.

  globtest globtests.ksh
0:ksh compatibility
>0:  [[ fofo = *(f*(o)) ]]
>0:  [[ ffo = *(f*(o)) ]]
>0:  [[ foooofo = *(f*(o)) ]]
>0:  [[ foooofof = *(f*(o)) ]]
>0:  [[ fooofoofofooo = *(f*(o)) ]]
>1:  [[ foooofof = *(f+(o)) ]]
>1:  [[ xfoooofof = *(f*(o)) ]]
>1:  [[ foooofofx = *(f*(o)) ]]
>0:  [[ ofxoofxo = *(*(of*(o)x)o) ]]
>1:  [[ ofooofoofofooo = *(f*(o)) ]]
>0:  [[ foooxfooxfoxfooox = *(f*(o)x) ]]
>1:  [[ foooxfooxofoxfooox = *(f*(o)x) ]]
>0:  [[ foooxfooxfxfooox = *(f*(o)x) ]]
>0:  [[ ofxoofxo = *(*(of*(o)x)o) ]]
>0:  [[ ofoooxoofxo = *(*(of*(o)x)o) ]]
>0:  [[ ofoooxoofxoofoooxoofxo = *(*(of*(o)x)o) ]]
>0:  [[ ofoooxoofxoofoooxoofxoo = *(*(of*(o)x)o) ]]
>1:  [[ ofoooxoofxoofoooxoofxofo = *(*(of*(o)x)o) ]]
>0:  [[ ofoooxoofxoofoooxoofxooofxofxo = *(*(of*(o)x)o) ]]
>0:  [[ aac = *(@(a))a@(c) ]]
>0:  [[ ac = *(@(a))a@(c) ]]
>1:  [[ c = *(@(a))a@(c) ]]
>0:  [[ aaac = *(@(a))a@(c) ]]
>1:  [[ baaac = *(@(a))a@(c) ]]
>0:  [[ abcd = ?@(a|b)*@(c)d ]]
>0:  [[ abcd = @(ab|a*@(b))*(c)d ]]
>0:  [[ acd = @(ab|a*(b))*(c)d ]]
>0:  [[ abbcd = @(ab|a*(b))*(c)d ]]
>0:  [[ effgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
>0:  [[ efgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
>0:  [[ egz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
>0:  [[ egzefffgzbcdij = *(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
>1:  [[ egz = @(b+(c)d|e+(f)g?|?(h)i@(j|k)) ]]
>0:  [[ ofoofo = *(of+(o)) ]]
>0:  [[ oxfoxoxfox = *(oxf+(ox)) ]]
>1:  [[ oxfoxfox = *(oxf+(ox)) ]]
>0:  [[ ofoofo = *(of+(o)|f) ]]
>0:  [[ foofoofo = @(foo|f|fo)*(f|of+(o)) ]]
>0:  [[ oofooofo = *(of|oof+(o)) ]]
>0:  [[ fffooofoooooffoofffooofff = *(*(f)*(o)) ]]
>1:  [[ fffooofoooooffoofffooofffx = *(*(f)*(o)) ]]
>0:  [[ fofoofoofofoo = *(fo|foo) ]]
>0:  [[ foo = !(x) ]]
>0:  [[ foo = !(x)* ]]
>1:  [[ foo = !(foo) ]]
>0:  [[ foo = !(foo)* ]]
>0:  [[ foobar = !(foo) ]]
>0:  [[ foobar = !(foo)* ]]
>0:  [[ moo.cow = !(*.*).!(*.*) ]]
>1:  [[ mad.moo.cow = !(*.*).!(*.*) ]]
>1:  [[ mucca.pazza = mu!(*(c))?.pa!(*(z))? ]]
>1:  [[ _foo~ = _?(*[^~]) ]]
>0:  [[ fff = !(f) ]]
>0:  [[ fff = *(!(f)) ]]
>0:  [[ fff = +(!(f)) ]]
>0:  [[ ooo = !(f) ]]
>0:  [[ ooo = *(!(f)) ]]
>0:  [[ ooo = +(!(f)) ]]
>0:  [[ foo = !(f) ]]
>0:  [[ foo = *(!(f)) ]]
>0:  [[ foo = +(!(f)) ]]
>1:  [[ f = !(f) ]]
>1:  [[ f = *(!(f)) ]]
>1:  [[ f = +(!(f)) ]]
>0:  [[ foot = @(!(z*)|*x) ]]
>1:  [[ zoot = @(!(z*)|*x) ]]
>0:  [[ foox = @(!(z*)|*x) ]]
>0:  [[ zoox = @(!(z*)|*x) ]]
>0:  [[ foo = *(!(foo)) ]]
>1:  [[ foob = !(foo)b* ]]
>0:  [[ foobb = !(foo)b* ]]
>0:  [[ fooxx = (#i)FOOXX ]]
>1:  [[ fooxx = (#l)FOOXX ]]
>0:  [[ FOOXX = (#l)fooxx ]]
>1:  [[ fooxx = (#i)FOO@(#I)X@(#i)X ]]
>0:  [[ fooXx = (#i)FOO@(#I)X@(#i)X ]]
>0:  [[ fooxx = @((#i)FOOX)x ]]
>1:  [[ fooxx = @((#i)FOOX)X ]]
>1:  [[ BAR = @(bar|(#i)foo) ]]
>0:  [[ FOO = @(bar|(#i)foo) ]]
>0:  [[ Modules = (#i)*m* ]]
>0 tests failed.