]>
Commit | Line | Data |
---|---|---|
495aee44 CR |
1 | a |
2 | b | |
3 | a b | |
4 | argv[1] = <a> | |
5 | argv[2] = <b> | |
6 | argv[3] = <x> | |
7 | argv[4] = <a> | |
8 | argv[5] = <b> | |
9 | argv[1] = <a\ b> | |
10 | argv[2] = <x> | |
11 | argv[3] = <a\ b> | |
12 | argv[1] = <foo 'bar' baz> | |
13 | argv[1] = <a b c d> | |
14 | argv[1] = <a b c d> | |
15 | argv[1] = <foo ax{{{}b c d{} bar> | |
16 | argv[2] = <}> | |
17 | argv[3] = <baz> | |
18 | argv[1] = <'foo'> | |
19 | argv[1] = <'foo'> | |
20 | argv[1] = <$a> | |
21 | argv[1] = <'foo'> | |
22 | argv[1] = <foo*bar> | |
23 | argv[1] = <foo*bar> | |
24 | argv[1] = <foo*bar'}> | |
25 | argv[1] = <x'> | |
26 | <.> <x> <.> <> <.> <x> <.> | |
27 | <x> <.> <w> <.> <x> <.> <w> <.> | |
28 | <x> <.> <w> <.> <x> <.> <w> <.> | |
29 | <x> <.> <w> <.> <x> <.> <w> <.> | |
30 | <.> <w> <.> <> <.> <w> <.> | |
31 | <.> <w> <.> <> <.> <w> <.> | |
32 | <x> <.> <x> <.> <x> <.> <x> <.> | |
33 | <x> <.> <w> <.> <x> <.> <w> <.> | |
34 | <x> <.> <w> <.> <x> <.> <w> <.> | |
35 | <x> <.> <w> <.> <x> <.> <w> <.> | |
36 | argv[1] = <'bar> | |
37 | argv[1] = <foo 'bar baz> | |
38 | argv[1] = <}z> | |
39 | argv[1] = <''z}> | |
d233b485 CR |
40 | argv[1] = <1> |
41 | argv[2] = <2> | |
42 | argv[1] = <1> | |
43 | argv[2] = <2> | |
44 | argv[1] = <1> | |
45 | argv[2] = <2> | |
46 | argv[1] = <1 2> | |
47 | argv[1] = <1> | |
48 | argv[2] = <2> | |
49 | argv[1] = <1 2> | |
50 | argv[1] = <1> | |
51 | argv[2] = <2> | |
52 | argv[1] = <1 2> | |
53 | argv[1] = <1> | |
54 | argv[2] = <2> | |
55 | argv[1] = <1 2> | |
56 | argv[1] = <1> | |
57 | argv[2] = <2> | |
58 | argv[1] = <1 2> | |
59 | argv[1] = <1> | |
60 | argv[2] = <2> | |
61 | argv[1] = <1> | |
62 | argv[2] = <2> | |
63 | argv[1] = <1> | |
64 | argv[2] = <2> | |
65 | argv[1] = <12> | |
66 | argv[1] = <1 2> | |
67 | argv[1] = <1 2> | |
68 | argv[1] = <1 2> | |
69 | argv[1] = <1 2> | |
70 | argv[1] = <1 2> | |
71 | argv[1] = <1 2> | |
72 | argv[1] = <12> | |
73 | argv[1] = <12> | |
74 | argv[1] = <12> | |
75 | argv[1] = <12> | |
76 | argv[1] = <12> | |
77 | argv[1] = <12> | |
78 | argv[1] = <1 2> | |
79 | argv[1] = <1 2> | |
80 | argv[1] = <12> | |
81 | argv[1] = <12> | |
82 | normal IFS | |
83 | argv[1] = <abc> | |
84 | argv[2] = <def> | |
85 | argv[3] = <ghi> | |
86 | argv[4] = <jkl> | |
87 | argv[1] = <abc> | |
88 | argv[2] = <def> | |
89 | argv[3] = <ghi> | |
90 | argv[4] = <jkl> | |
91 | argv[1] = <abc> | |
92 | argv[2] = <def> | |
93 | argv[3] = <ghi> | |
94 | argv[4] = <jkl> | |
95 | null IFS | |
96 | argv[1] = < abc> | |
97 | argv[2] = <def ghi> | |
98 | argv[3] = <jkl > | |
99 | argv[1] = < abc def ghi jkl > | |
100 | argv[1] = < abc> | |
101 | argv[2] = <def ghi> | |
102 | argv[3] = <jkl > | |
103 | non-standard IFS | |
104 | argv[1] = < abc> | |
105 | argv[2] = <def ghi> | |
106 | argv[3] = <jkl > | |
107 | argv[1] = < abc def ghi jkl > | |
108 | argv[1] = < abc def ghi jkl > | |
109 | unset IFS | |
110 | argv[1] = < abc> | |
111 | argv[2] = <def ghi> | |
112 | argv[3] = <jkl > | |
113 | argv[1] = < abc def ghi jkl > | |
114 | argv[1] = < abc def ghi jkl > | |
115 | ||
116 | 001: IFS = (unset): unset -v foo; set -- ${foo=$*} | |
117 | soh stx etx del / soh stx etx del | |
118 | ||
119 | 002: IFS = (unset): unset -v foo; set -- ${foo="$*"} | |
120 | soh stx etx del / soh stx etx del | |
121 | ||
122 | 003: IFS = (unset): unset -v foo; set -- "${foo=$*}" | |
123 | soh stx etx del / soh stx etx del | |
124 | ||
125 | 004: IFS = (unset): foo=; set -- ${foo:=$*} | |
126 | soh stx etx del / soh stx etx del | |
127 | ||
128 | 005: IFS = (unset): foo=; set -- ${foo:="$*"} | |
129 | soh stx etx del / soh stx etx del | |
130 | ||
131 | 006: IFS = (unset): foo=; set -- "${foo:=$*}" | |
132 | soh stx etx del / soh stx etx del | |
133 | ||
134 | 007: IFS = (unset): unset -v foo; set -- ${foo=$@} | |
135 | soh stx etx del / soh stx etx del | |
136 | ||
137 | 008: IFS = (unset): unset -v foo; set -- ${foo="$@"} | |
138 | soh stx etx del / soh stx etx del | |
139 | ||
140 | 009: IFS = (unset): unset -v foo; set -- "${foo=$@}" | |
141 | soh stx etx del / soh stx etx del | |
142 | ||
143 | 010: IFS = (unset): foo=; set -- ${foo:=$@} | |
144 | soh stx etx del / soh stx etx del | |
145 | ||
146 | 011: IFS = (unset): foo=; set -- ${foo:="$@"} | |
147 | soh stx etx del / soh stx etx del | |
148 | ||
149 | 012: IFS = (unset): foo=; set -- "${foo:=$@}" | |
150 | soh stx etx del / soh stx etx del | |
151 | ||
152 | 013: IFS = (null): unset -v foo; set -- ${foo=$*} | |
153 | soh stx etx del / soh stx etx del | |
154 | ||
155 | 014: IFS = (null): unset -v foo; set -- ${foo="$*"} | |
156 | soh stx etx del / soh stx etx del | |
157 | ||
158 | 015: IFS = (null): unset -v foo; set -- "${foo=$*}" | |
159 | soh stx etx del / soh stx etx del | |
160 | ||
161 | 016: IFS = (null): foo=; set -- ${foo:=$*} | |
162 | soh stx etx del / soh stx etx del | |
163 | ||
164 | 017: IFS = (null): foo=; set -- ${foo:="$*"} | |
165 | soh stx etx del / soh stx etx del | |
166 | ||
167 | 018: IFS = (null): foo=; set -- "${foo:=$*}" | |
168 | soh stx etx del / soh stx etx del | |
169 | ||
170 | 019: IFS = (null): unset -v foo; set -- ${foo=$@} | |
171 | soh stx etx del / soh stx etx del | |
172 | ||
173 | 020: IFS = (null): unset -v foo; set -- ${foo="$@"} | |
174 | soh stx etx del / soh stx etx del | |
175 | ||
176 | 021: IFS = (null): unset -v foo; set -- "${foo=$@}" | |
177 | soh stx etx del / soh stx etx del | |
178 | ||
179 | 022: IFS = (null): foo=; set -- ${foo:=$@} | |
180 | soh stx etx del / soh stx etx del | |
181 | ||
182 | 023: IFS = (null): foo=; set -- ${foo:="$@"} | |
183 | soh stx etx del / soh stx etx del | |
184 | ||
185 | 024: IFS = (null): foo=; set -- "${foo:=$@}" | |
186 | soh stx etx del / soh stx etx del | |
187 | ||
188 | 025: IFS = x: unset -v foo; set -- ${foo=$*} | |
189 | soh stx etx del / soh stx etx del | |
190 | ||
191 | 026: IFS = x: unset -v foo; set -- ${foo="$*"} | |
192 | soh stx etx del / soh stx etx del | |
193 | ||
194 | 027: IFS = x: unset -v foo; set -- "${foo=$*}" | |
195 | soh stx etx del / soh stx etx del | |
196 | ||
197 | 028: IFS = x: foo=; set -- ${foo:=$*} | |
198 | soh stx etx del / soh stx etx del | |
199 | ||
200 | 029: IFS = x: foo=; set -- ${foo:="$*"} | |
201 | soh stx etx del / soh stx etx del | |
202 | ||
203 | 030: IFS = x: foo=; set -- "${foo:=$*}" | |
204 | soh stx etx del / soh stx etx del | |
205 | ||
206 | 031: IFS = x: unset -v foo; set -- ${foo=$@} | |
207 | soh stx etx del / soh stx etx del | |
208 | ||
209 | 032: IFS = x: unset -v foo; set -- ${foo="$@"} | |
210 | soh stx etx del / soh stx etx del | |
211 | ||
212 | 033: IFS = x: unset -v foo; set -- "${foo=$@}" | |
213 | soh stx etx del / soh stx etx del | |
214 | ||
215 | 034: IFS = x: foo=; set -- ${foo:=$@} | |
216 | soh stx etx del / soh stx etx del | |
217 | ||
218 | 035: IFS = x: foo=; set -- ${foo:="$@"} | |
219 | soh stx etx del / soh stx etx del | |
220 | ||
221 | 036: IFS = x: foo=; set -- "${foo:=$@}" | |
222 | soh stx etx del / soh stx etx del | |
223 | ||
224 | 037: IFS = sp ht nl: unset -v foo; set -- ${foo=$*} | |
225 | soh stx etx del / soh stx etx del | |
226 | ||
227 | 038: IFS = sp ht nl: unset -v foo; set -- ${foo="$*"} | |
228 | soh stx etx del / soh stx etx del | |
229 | ||
230 | 039: IFS = sp ht nl: unset -v foo; set -- "${foo=$*}" | |
231 | soh stx etx del / soh stx etx del | |
232 | ||
233 | 040: IFS = sp ht nl: foo=; set -- ${foo:=$*} | |
234 | soh stx etx del / soh stx etx del | |
235 | ||
236 | 041: IFS = sp ht nl: foo=; set -- ${foo:="$*"} | |
237 | soh stx etx del / soh stx etx del | |
238 | ||
239 | 042: IFS = sp ht nl: foo=; set -- "${foo:=$*}" | |
240 | soh stx etx del / soh stx etx del | |
241 | ||
242 | 043: IFS = sp ht nl: unset -v foo; set -- ${foo=$@} | |
243 | soh stx etx del / soh stx etx del | |
244 | ||
245 | 044: IFS = sp ht nl: unset -v foo; set -- ${foo="$@"} | |
246 | soh stx etx del / soh stx etx del | |
247 | ||
248 | 045: IFS = sp ht nl: unset -v foo; set -- "${foo=$@}" | |
249 | soh stx etx del / soh stx etx del | |
250 | ||
251 | 046: IFS = sp ht nl: foo=; set -- ${foo:=$@} | |
252 | soh stx etx del / soh stx etx del | |
253 | ||
254 | 047: IFS = sp ht nl: foo=; set -- ${foo:="$@"} | |
255 | soh stx etx del / soh stx etx del | |
256 | ||
257 | 048: IFS = sp ht nl: foo=; set -- "${foo:=$@}" | |
258 | soh stx etx del / soh stx etx del | |
259 | argv[1] = <^A^B^C^?> | |
260 | argv[1] = <^A^B^C^?> | |
261 | argv[1] = <^A^B^C^?> | |
262 | argv[1] = <^A^B^C^?> | |
263 | argv[1] = <^A^B^C^?> | |
264 | argv[1] = <^A^B^C^?> | |
265 | argv[1] = <^A^B^C^?> | |
266 | argv[1] = <^A^B^C^?> | |
267 | argv[1] = <a> | |
268 | argv[2] = <b> | |
269 | argv[1] = <a> | |
270 | argv[2] = <b> | |
271 | argv[1] = <a> | |
272 | argv[2] = <b> | |
273 | argv[1] = <a> | |
274 | argv[2] = <b> | |
275 | [ abc def ghi jkl / abc def ghi jkl ] | |
276 | [ abc def ghi jkl ] | |
277 | [ abc def ghi jkl / abc def ghi jkl / abc def ghi jkl ] | |
278 | 5: notOK | |
279 | OK | |
280 | OK | |
281 | 5: $'not\ttoo\nbad' | |
8868edaf CR |
282 | "A" |
283 | A | |
284 | argv[1] = <"A"> | |
285 | argv[1] = <A> | |
286 | argv[1] = <A> | |
287 | ./posixexp.tests: line 97: unexpected EOF while looking for matching `}' | |
288 | ./posixexp.tests: line 98: syntax error: unexpected end of file |