1 # Check the internal shell handling component of the ShTest format.
3 # RUN: not %{lit} -v %{inputs}/shtest-shell > %t.out
4 # FIXME: Temporarily dump test output so we can debug failing tests on
7 # RUN: FileCheck --input-file %t.out %s
9 # Test again in non-UTF shell to catch potential errors with python 2 seen
10 # on stdout-encoding.txt
11 # RUN: env PYTHONIOENCODING=ascii not %{lit} -a %{inputs}/shtest-shell > %t.ascii.out
12 # FIXME: Temporarily dump test output so we can debug failing tests on
14 # RUN: cat %t.ascii.out
15 # RUN: FileCheck --input-file %t.ascii.out %s
21 # CHECK: FAIL: shtest-shell :: colon-error.txt
22 # CHECK: *** TEST 'shtest-shell :: colon-error.txt' FAILED ***
24 # CHECK: # .---command stderr{{-*}}
25 # CHECK: # | Unsupported: ':' cannot be part of a pipeline
26 # CHECK: # error: command failed with exit status: 127
29 # CHECK: PASS: shtest-shell :: continuations.txt
31 # CHECK: PASS: shtest-shell :: dev-null.txt
33 # CHECK: FAIL: shtest-shell :: diff-b.txt
34 # CHECK: *** TEST 'shtest-shell :: diff-b.txt' FAILED ***
35 # CHECK: diff -b {{[^"]*}}.0 {{[^"]*}}.1
36 # CHECK: # .---command stdout{{-*}}
37 # CHECK: # | {{.*}}1,2
38 # CHECK-NEXT: # | f o o
39 # CHECK-NEXT: # | ! b a r
41 # CHECK-NEXT: # | f o o
42 # CHECK-NEXT: # | ! bar
43 # CHECK-NEXT: # `---{{-*}}
44 # CHECK-NEXT: # error: command failed with exit status: 1
48 # CHECK: FAIL: shtest-shell :: diff-encodings.txt
49 # CHECK: *** TEST 'shtest-shell :: diff-encodings.txt' FAILED ***
51 # CHECK: diff -u diff-in.bin diff-in.bin
52 # CHECK-NEXT: # executed command: diff -u diff-in.bin diff-in.bin
55 # CHECK: diff -u diff-in.utf16 diff-in.bin && false || true
56 # CHECK-NEXT: # executed command: diff -u diff-in.utf16 diff-in.bin
57 # CHECK-NEXT: # .---command stdout{{-*}}
61 # CHECK-NEXT: # | {{.f.o.o.$}}
62 # CHECK-NEXT: # | {{-.b.a.r.$}}
63 # CHECK-NEXT: # | {{\+.b.a.r.}}
64 # CHECK-NEXT: # | {{.b.a.z.$}}
65 # CHECK-NEXT: # `---{{-*}}
66 # CHECK-NEXT: # error: command failed with exit status: 1
67 # CHECK-NEXT: # executed command: true
69 # CHECK: diff -u diff-in.utf8 diff-in.bin && false || true
70 # CHECK-NEXT: # executed command: diff -u diff-in.utf8 diff-in.bin
71 # CHECK-NEXT: # .---command stdout{{-*}}
75 # CHECK-NEXT: # | -foo
76 # CHECK-NEXT: # | -bar
77 # CHECK-NEXT: # | -baz
78 # CHECK-NEXT: # | {{\+.f.o.o.$}}
79 # CHECK-NEXT: # | {{\+.b.a.r.}}
80 # CHECK-NEXT: # | {{\+.b.a.z.$}}
81 # CHECK-NEXT: # `---{{-*}}
82 # CHECK-NEXT: # error: command failed with exit status: 1
83 # CHECK-NEXT: # executed command: true
85 # CHECK: diff -u diff-in.bin diff-in.utf8 && false || true
86 # CHECK-NEXT: # executed command: diff -u diff-in.bin diff-in.utf8
87 # CHECK-NEXT: # .---command stdout{{-*}}
91 # CHECK-NEXT: # | {{-.f.o.o.$}}
92 # CHECK-NEXT: # | {{-.b.a.r.}}
93 # CHECK-NEXT: # | {{-.b.a.z.$}}
94 # CHECK-NEXT: # | +foo
95 # CHECK-NEXT: # | +bar
96 # CHECK-NEXT: # | +baz
97 # CHECK-NEXT: # `---{{-*}}
98 # CHECK-NEXT: # error: command failed with exit status: 1
99 # CHECK-NEXT: # executed command: true
101 # CHECK: cat diff-in.bin | diff -u - diff-in.bin
104 # CHECK: cat diff-in.bin | diff -u diff-in.bin -
107 # CHECK: cat diff-in.bin | diff -u diff-in.utf16 - && false || true
108 # CHECK-NEXT: # executed command: cat diff-in.bin
109 # CHECK-NEXT: # executed command: diff -u diff-in.utf16 -
110 # CHECK-NEXT: # .---command stdout{{-*}}
111 # CHECK-NEXT: # | ---
112 # CHECK-NEXT: # | +++
114 # CHECK-NEXT: # | {{.f.o.o.$}}
115 # CHECK-NEXT: # | {{-.b.a.r.$}}
116 # CHECK-NEXT: # | {{\+.b.a.r.}}
117 # CHECK-NEXT: # | {{.b.a.z.$}}
118 # CHECK-NEXT: # `---{{-*}}
119 # CHECK-NEXT: # error: command failed with exit status: 1
120 # CHECK-NEXT: # executed command: true
122 # CHECK: cat diff-in.bin | diff -u diff-in.utf8 - && false || true
123 # CHECK-NEXT: # executed command: cat diff-in.bin
124 # CHECK-NEXT: # executed command: diff -u diff-in.utf8 -
125 # CHECK-NEXT: # .---command stdout{{-*}}
126 # CHECK-NEXT: # | ---
127 # CHECK-NEXT: # | +++
129 # CHECK-NEXT: # | -foo
130 # CHECK-NEXT: # | -bar
131 # CHECK-NEXT: # | -baz
132 # CHECK-NEXT: # | {{\+.f.o.o.$}}
133 # CHECK-NEXT: # | {{\+.b.a.r.}}
134 # CHECK-NEXT: # | {{\+.b.a.z.$}}
135 # CHECK-NEXT: # `---{{-*}}
136 # CHECK-NEXT: # error: command failed with exit status: 1
137 # CHECK-NEXT: # executed command: true
139 # CHECK: cat diff-in.bin | diff -u - diff-in.utf8 && false || true
140 # CHECK-NEXT: # executed command: cat diff-in.bin
141 # CHECK-NEXT: # executed command: diff -u - diff-in.utf8
142 # CHECK-NEXT: # .---command stdout{{-*}}
143 # CHECK-NEXT: # | ---
144 # CHECK-NEXT: # | +++
146 # CHECK-NEXT: # | {{-.f.o.o.$}}
147 # CHECK-NEXT: # | {{-.b.a.r.}}
148 # CHECK-NEXT: # | {{-.b.a.z.$}}
149 # CHECK-NEXT: # | +foo
150 # CHECK-NEXT: # | +bar
151 # CHECK-NEXT: # | +baz
152 # CHECK-NEXT: # `---{{-*}}
153 # CHECK-NEXT: # error: command failed with exit status: 1
154 # CHECK-NEXT: # executed command: true
161 # CHECK: FAIL: shtest-shell :: diff-error-1.txt
162 # CHECK: *** TEST 'shtest-shell :: diff-error-1.txt' FAILED ***
163 # CHECK: diff -B temp1.txt temp2.txt
164 # CHECK: # .---command stderr{{-*}}
165 # CHECK: # | Unsupported: 'diff': option -B not recognized
166 # CHECK: # error: command failed with exit status: 1
169 # CHECK: FAIL: shtest-shell :: diff-error-2.txt
170 # CHECK: *** TEST 'shtest-shell :: diff-error-2.txt' FAILED ***
171 # CHECK: diff temp.txt
172 # CHECK: # .---command stderr{{-*}}
173 # CHECK: # | Error: missing or extra operand
174 # CHECK: # error: command failed with exit status: 1
177 # CHECK: FAIL: shtest-shell :: diff-error-3.txt
178 # CHECK: *** TEST 'shtest-shell :: diff-error-3.txt' FAILED ***
179 # CHECK: diff temp.txt temp1.txt
180 # CHECK: # .---command stderr{{-*}}
181 # CHECK: # | Error: 'diff' command failed
182 # CHECK: error: command failed with exit status: 1
185 # CHECK: FAIL: shtest-shell :: diff-error-4.txt
186 # CHECK: *** TEST 'shtest-shell :: diff-error-4.txt' FAILED ***
187 # CHECK: Exit Code: 1
188 # CHECK: # .---command stdout{{-*}}
189 # CHECK-NEXT: # | {{.*}}diff-error-4.txt.tmp
190 # CHECK-NEXT: # | {{.*}}diff-error-4.txt.tmp1
191 # CHECK-NEXT: # | {{\*+}}
192 # CHECK-NEXT: # | *** 1 ****
193 # CHECK-NEXT: # | ! hello-first
194 # CHECK-NEXT: # | --- 1 ----
195 # CHECK-NEXT: # | ! hello-second
196 # CHECK-NEXT: # `---{{-*}}
199 # CHECK: FAIL: shtest-shell :: diff-error-5.txt
200 # CHECK: *** TEST 'shtest-shell :: diff-error-5.txt' FAILED ***
202 # CHECK: # .---command stderr{{-*}}
203 # CHECK: # | Error: missing or extra operand
204 # CHECK: # error: command failed with exit status: 1
207 # CHECK: FAIL: shtest-shell :: diff-error-6.txt
208 # CHECK: *** TEST 'shtest-shell :: diff-error-6.txt' FAILED ***
210 # CHECK: # .---command stderr{{-*}}
211 # CHECK: # | Error: missing or extra operand
212 # CHECK: # error: command failed with exit status: 1
216 # CHECK: FAIL: shtest-shell :: diff-pipes.txt
218 # CHECK: *** TEST 'shtest-shell :: diff-pipes.txt' FAILED ***
220 # CHECK: diff {{[^ ]*}}.foo {{.*}}.foo | FileCheck {{.*}}
224 # CHECK: diff -u {{.*}}.foo {{.*}}.bar | FileCheck {{.*}} && false || true
225 # CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
226 # CHECK-NEXT: # note: command had no output on stdout or stderr
227 # CHECK-NEXT: # error: command failed with exit status: 1
228 # CHECK-NEXT: # executed command: FileCheck
229 # CHECK-NEXT: # executed command: true
231 # CHECK: cat {{.*}}.foo | diff -u - {{.*}}.foo
235 # CHECK: cat {{.*}}.foo | diff -u {{.*}}.foo -
239 # CHECK: cat {{.*}}.bar | diff -u {{.*}}.foo - && false || true
240 # CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}
241 # CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} -
242 # CHECK-NEXT: # .---command stdout{{-*}}
244 # CHECK-NEXT: # | -foo
245 # CHECK-NEXT: # | +bar
246 # CHECK-NEXT: # `---{{-*}}
247 # CHECK-NEXT: # error: command failed with exit status: 1
248 # CHECK-NEXT: # executed command: true
250 # CHECK: cat {{.*}}.bar | diff -u - {{.*}}.foo && false || true
251 # CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}
252 # CHECK-NEXT: # executed command: diff -u - {{.+}}.foo{{.*}}
253 # CHECK-NEXT: # .---command stdout{{-*}}
255 # CHECK-NEXT: # | -bar
256 # CHECK-NEXT: # | +foo
257 # CHECK-NEXT: # `---{{-*}}
258 # CHECK-NEXT: # error: command failed with exit status: 1
259 # CHECK-NEXT: # executed command: true
261 # CHECK: cat {{.*}}.foo | diff - {{.*}}.foo | FileCheck {{.*}}
265 # CHECK: cat {{.*}}.bar | diff -u {{.*}}.foo - | FileCheck {{.*}}
266 # CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}
267 # CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} -
268 # CHECK-NEXT: note: command had no output on stdout or stderr
269 # CHECK-NEXT: error: command failed with exit status: 1
270 # CHECK-NEXT: # executed command: FileCheck
271 # CHECK-NEXT: # executed command: true
278 # CHECK: FAIL: shtest-shell :: diff-r-error-0.txt
279 # CHECK: *** TEST 'shtest-shell :: diff-r-error-0.txt' FAILED ***
281 # CHECK: # .---command stdout{{-*}}
282 # CHECK: # | Only in {{.*}}dir1: dir1unique
283 # CHECK: # | Only in {{.*}}dir2: dir2unique
284 # CHECK: # error: command failed with exit status: 1
286 # CHECK: FAIL: shtest-shell :: diff-r-error-1.txt
287 # CHECK: *** TEST 'shtest-shell :: diff-r-error-1.txt' FAILED ***
289 # CHECK: # .---command stdout{{-*}}
290 # CHECK: # | *** {{.*}}dir1{{.*}}subdir{{.*}}f01
291 # CHECK: # | --- {{.*}}dir2{{.*}}subdir{{.*}}f01
294 # CHECK: # error: command failed with exit status: 1
296 # CHECK: FAIL: shtest-shell :: diff-r-error-2.txt
297 # CHECK: *** TEST 'shtest-shell :: diff-r-error-2.txt' FAILED ***
299 # CHECK: # .---command stdout{{-*}}
300 # CHECK: # | Only in {{.*}}dir2: extrafile
301 # CHECK: # error: command failed with exit status: 1
303 # CHECK: FAIL: shtest-shell :: diff-r-error-3.txt
304 # CHECK: *** TEST 'shtest-shell :: diff-r-error-3.txt' FAILED ***
306 # CHECK: # .---command stdout{{-*}}
307 # CHECK: # | Only in {{.*}}dir1: extra_subdir
308 # CHECK: # error: command failed with exit status: 1
310 # CHECK: FAIL: shtest-shell :: diff-r-error-4.txt
311 # CHECK: *** TEST 'shtest-shell :: diff-r-error-4.txt' FAILED ***
313 # CHECK: # .---command stdout{{-*}}
314 # CHECK: # | File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file
315 # CHECK: # error: command failed with exit status: 1
317 # CHECK: FAIL: shtest-shell :: diff-r-error-5.txt
318 # CHECK: *** TEST 'shtest-shell :: diff-r-error-5.txt' FAILED ***
320 # CHECK: # .---command stdout{{-*}}
321 # CHECK: # | Only in {{.*}}dir1: extra_subdir
322 # CHECK: # error: command failed with exit status: 1
324 # CHECK: FAIL: shtest-shell :: diff-r-error-6.txt
325 # CHECK: *** TEST 'shtest-shell :: diff-r-error-6.txt' FAILED ***
327 # CHECK: # .---command stdout{{-*}}
328 # CHECK: # | File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory
329 # CHECK: # error: command failed with exit status: 1
331 # CHECK: FAIL: shtest-shell :: diff-r-error-7.txt
332 # CHECK: *** TEST 'shtest-shell :: diff-r-error-7.txt' FAILED ***
333 # CHECK: diff -r - {{.*}}
334 # CHECK: # .---command stderr{{-*}}
335 # CHECK: # | Error: cannot recursively compare '-'
336 # CHECK: # error: command failed with exit status: 1
338 # CHECK: FAIL: shtest-shell :: diff-r-error-8.txt
339 # CHECK: *** TEST 'shtest-shell :: diff-r-error-8.txt' FAILED ***
340 # CHECK: diff -r {{.*}} -
341 # CHECK: # .---command stderr{{-*}}
342 # CHECK: # | Error: cannot recursively compare '-'
343 # CHECK: # error: command failed with exit status: 1
345 # CHECK: PASS: shtest-shell :: diff-r.txt
348 # CHECK: FAIL: shtest-shell :: diff-strip-trailing-cr.txt
350 # CHECK: *** TEST 'shtest-shell :: diff-strip-trailing-cr.txt' FAILED ***
352 # CHECK: diff -u diff-in.dos diff-in.unix && false || true
353 # CHECK-NEXT: # executed command: diff -u diff-in.dos diff-in.unix
354 # CHECK-NEXT: # .---command stdout{{-*}}
356 # CHECK-NEXT: # | -In this file, the
357 # CHECK-NEXT: # | -sequence "\r\n"
358 # CHECK-NEXT: # | -terminates lines.
359 # CHECK-NEXT: # | +In this file, the
360 # CHECK-NEXT: # | +sequence "\n"
361 # CHECK-NEXT: # | +terminates lines.
362 # CHECK-NEXT: # `---{{-*}}
363 # CHECK-NEXT: # error: command failed with exit status: 1
364 # CHECK-NEXT: # executed command: true
366 # CHECK: diff -u diff-in.unix diff-in.dos && false || true
367 # CHECK-NEXT: # executed command: diff -u diff-in.unix diff-in.dos
368 # CHECK-NEXT: # .---command stdout{{-*}}
370 # CHECK-NEXT: # | -In this file, the
371 # CHECK-NEXT: # | -sequence "\n"
372 # CHECK-NEXT: # | -terminates lines.
373 # CHECK-NEXT: # | +In this file, the
374 # CHECK-NEXT: # | +sequence "\r\n"
375 # CHECK-NEXT: # | +terminates lines.
376 # CHECK-NEXT: # `---{{-*}}
377 # CHECK-NEXT: # error: command failed with exit status: 1
378 # CHECK-NEXT: # executed command: true
380 # CHECK: diff -u --strip-trailing-cr diff-in.dos diff-in.unix && false || true
381 # CHECK-NEXT: executed command: diff -u --strip-trailing-cr diff-in.dos diff-in.unix
382 # CHECK-NEXT: # .---command stdout{{-*}}
384 # CHECK-NEXT: # | In this file, the
385 # CHECK-NEXT: # | -sequence "\r\n"
386 # CHECK-NEXT: # | +sequence "\n"
387 # CHECK-NEXT: # | terminates lines.
388 # CHECK-NEXT: # `---{{-*}}
389 # CHECK-NEXT: # error: command failed with exit status: 1
390 # CHECK-NEXT: # executed command: true
392 # CHECK: diff -u --strip-trailing-cr diff-in.unix diff-in.dos && false || true
393 # CHECK-NEXT: # executed command: diff -u --strip-trailing-cr diff-in.unix diff-in.dos
394 # CHECK-NEXT: # .---command stdout{{-*}}
396 # CHECK-NEXT: # | In this file, the
397 # CHECK-NEXT: # | -sequence "\n"
398 # CHECK-NEXT: # | +sequence "\r\n"
399 # CHECK-NEXT: # | terminates lines.
400 # CHECK-NEXT: # `---{{-*}}
401 # CHECK-NEXT: # error: command failed with exit status: 1
402 # CHECK-NEXT: # executed command: true
409 # CHECK: FAIL: shtest-shell :: diff-unified.txt
411 # CHECK: *** TEST 'shtest-shell :: diff-unified.txt' FAILED ***
413 # CHECK: diff -u {{.*}}.foo {{.*}}.bar && false || true
414 # CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
415 # CHECK-NEXT: # .---command stdout{{-*}}
416 # CHECK: # | @@ {{.*}} @@
420 # CHECK-NEXT: # | -6 foo
421 # CHECK-NEXT: # | +6 bar
425 # CHECK-NEXT: # `---{{-*}}
426 # CHECK-NEXT: # error: command failed with exit status: 1
427 # CHECK-NEXT: # executed command: true
429 # CHECK: diff -U 2 {{.*}}.foo {{.*}}.bar && false || true
430 # CHECK-NEXT: # executed command: diff -U 2 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
431 # CHECK-NEXT: # .---command stdout{{-*}}
432 # CHECK: # | @@ {{.*}} @@
435 # CHECK-NEXT: # | -6 foo
436 # CHECK-NEXT: # | +6 bar
439 # CHECK-NEXT: # `---{{-*}}
440 # CHECK-NEXT: # error: command failed with exit status: 1
441 # CHECK-NEXT: # executed command: true
443 # CHECK: diff -U4 {{.*}}.foo {{.*}}.bar && false || true
444 # CHECK-NEXT: # executed command: diff -U4 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
445 # CHECK-NEXT: # .---command stdout{{-*}}
446 # CHECK: # | @@ {{.*}} @@
451 # CHECK-NEXT: # | -6 foo
452 # CHECK-NEXT: # | +6 bar
457 # CHECK-NEXT: # `---{{-*}}
458 # CHECK-NEXT: # error: command failed with exit status: 1
459 # CHECK-NEXT: # executed command: true
461 # CHECK: diff -U0 {{.*}}.foo {{.*}}.bar && false || true
462 # CHECK-NEXT: # executed command: diff -U0 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}
463 # CHECK-NEXT: # .---command stdout{{-*}}
464 # CHECK: # | @@ {{.*}} @@
465 # CHECK-NEXT: # | -6 foo
466 # CHECK-NEXT: # | +6 bar
467 # CHECK-NEXT: # `---{{-*}}
468 # CHECK-NEXT: # error: command failed with exit status: 1
469 # CHECK-NEXT: # executed command: true
471 # CHECK: diff -U 30.1 {{.*}} {{.*}} && false || true
472 # CHECK: # executed command: diff -U 30.1 {{.*}} {{.*}}
473 # CHECK: # .---command stderr{{-*}}
474 # CHECK: # | Error: invalid '-U' argument: 30.1
475 # CHECK: # error: command failed with exit status: 1
476 # CHECK: # executed command: true
478 # CHECK: diff -U-1 {{.*}} {{.*}} && false || true
479 # CHECK: # executed command: diff -U-1 {{.*}} {{.*}}
480 # CHECK: # .---command stderr{{-*}}
481 # CHECK: # | Error: invalid '-U' argument: -1
482 # CHECK: # error: command failed with exit status: 1
483 # CHECK: # executed command: true
490 # CHECK: FAIL: shtest-shell :: diff-w.txt
491 # CHECK: *** TEST 'shtest-shell :: diff-w.txt' FAILED ***
492 # CHECK: diff -w {{.*}}.0 {{.*}}.1
493 # CHECK: # .---command stdout{{-*}}
494 # CHECK: # | {{\*+}} 1,3
495 # CHECK-NEXT: # | foo
496 # CHECK-NEXT: # | bar
497 # CHECK-NEXT: # | ! baz
498 # CHECK-NEXT: # | ---
499 # CHECK-NEXT: # | foo
500 # CHECK-NEXT: # | bar
501 # CHECK-NEXT: # | ! bat
502 # CHECK-NEXT: # `---{{-*}}
503 # CHECK-NEXT: # error: command failed with exit status: 1
506 # CHECK: FAIL: shtest-shell :: echo-at-redirect-stderr.txt
507 # CHECK: *** TEST 'shtest-shell :: echo-at-redirect-stderr.txt' FAILED ***
508 # CHECK: @echo 2> {{.*}}
509 # CHECK: # executed command: @echo
510 # CHECK: # .---command stderr{{-*}}
511 # CHECK: # | stdin and stderr redirects not supported for @echo
512 # CHECK: error: command failed with exit status:
514 # CHECK: FAIL: shtest-shell :: echo-at-redirect-stdin.txt
515 # CHECK: *** TEST 'shtest-shell :: echo-at-redirect-stdin.txt' FAILED ***
516 # CHECK: @echo < {{.*}}
517 # CHECK: # executed command: @echo
518 # CHECK: # .---command stderr{{-*}}
519 # CHECK: # | stdin and stderr redirects not supported for @echo
520 # CHECK: error: command failed with exit status:
522 # CHECK: FAIL: shtest-shell :: echo-redirect-stderr.txt
523 # CHECK: *** TEST 'shtest-shell :: echo-redirect-stderr.txt' FAILED ***
524 # CHECK: echo 2> {{.*}}
525 # CHECK: # executed command: echo
526 # CHECK: # .---command stderr{{-*}}
527 # CHECK: # | stdin and stderr redirects not supported for echo
528 # CHECK: error: command failed with exit status:
530 # CHECK: FAIL: shtest-shell :: echo-redirect-stdin.txt
531 # CHECK: *** TEST 'shtest-shell :: echo-redirect-stdin.txt' FAILED ***
532 # CHECK: echo < {{.*}}
533 # CHECK: # executed command: echo
534 # CHECK: # .---command stderr{{-*}}
535 # CHECK: # | stdin and stderr redirects not supported for echo
536 # CHECK: error: command failed with exit status:
538 # CHECK: FAIL: shtest-shell :: error-0.txt
539 # CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***
540 # CHECK: not-a-real-command
541 # CHECK: # .---command stderr{{-*}}
542 # CHECK: # | 'not-a-real-command': command not found
543 # CHECK: # error: command failed with exit status: 127
546 # FIXME: The output here sucks.
548 # CHECK: UNRESOLVED: shtest-shell :: error-1.txt
549 # CHECK-NEXT: *** TEST 'shtest-shell :: error-1.txt' FAILED ***
550 # CHECK-NEXT: Exit Code: 1
552 # CHECK-NEXT: Command Output (stdout):
554 # CHECK-NEXT: # shell parser error on RUN: at line 3: echo "missing quote
560 # CHECK: FAIL: shtest-shell :: error-2.txt
561 # CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED ***
562 # CHECK: Unsupported redirect:
565 # CHECK: FAIL: shtest-shell :: mkdir-error-0.txt
566 # CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED ***
567 # CHECK: mkdir -p temp | rm -rf temp
568 # CHECK: # .---command stderr{{-*}}
569 # CHECK: # | Unsupported: 'mkdir' cannot be part of a pipeline
570 # CHECK: # error: command failed with exit status: 127
573 # CHECK: FAIL: shtest-shell :: mkdir-error-1.txt
574 # CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED ***
575 # CHECK: mkdir -p -m 777 temp
576 # CHECK: # .---command stderr{{-*}}
577 # CHECK: # | Unsupported: 'mkdir': option -m not recognized
578 # CHECK: # error: command failed with exit status: 127
581 # CHECK: FAIL: shtest-shell :: mkdir-error-2.txt
582 # CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED ***
584 # CHECK: # .---command stderr{{-*}}
585 # CHECK: # | Error: 'mkdir' is missing an operand
586 # CHECK: # error: command failed with exit status: 127
589 # CHECK: PASS: shtest-shell :: redirects.txt
591 # CHECK: FAIL: shtest-shell :: rm-error-0.txt
592 # CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED ***
593 # CHECK: rm -rf temp | echo "hello"
594 # CHECK: # .---command stderr{{-*}}
595 # CHECK: # | Unsupported: 'rm' cannot be part of a pipeline
596 # CHECK: # error: command failed with exit status: 127
599 # CHECK: FAIL: shtest-shell :: rm-error-1.txt
600 # CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED ***
601 # CHECK: rm -f -v temp
602 # CHECK: # .---command stderr{{-*}}
603 # CHECK: # | Unsupported: 'rm': option -v not recognized
604 # CHECK: # error: command failed with exit status: 127
607 # CHECK: FAIL: shtest-shell :: rm-error-2.txt
608 # CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED ***
610 # CHECK: # .---command stderr{{-*}}
611 # CHECK: # | Error: 'rm' command failed
612 # CHECK: # error: command failed with exit status: 1
615 # CHECK: FAIL: shtest-shell :: rm-error-3.txt
616 # CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED ***
617 # CHECK: Exit Code: 1
620 # CHECK: PASS: shtest-shell :: rm-unicode-0.txt
621 # CHECK: PASS: shtest-shell :: sequencing-0.txt
622 # CHECK: XFAIL: shtest-shell :: sequencing-1.txt
624 # CHECK: FAIL: shtest-shell :: stdout-encoding.txt
625 # CHECK: *** TEST 'shtest-shell :: stdout-encoding.txt' FAILED ***
626 # CHECK: cat diff-in.bin
627 # CHECK: # .---command stdout{{-*}}
628 # CHECK-NEXT: # | {{.f.o.o.$}}
629 # CHECK-NEXT: # | {{.b.a.r.}}
630 # CHECK-NEXT: # | {{.b.a.z.$}}
631 # CHECK-NEXT: # `---{{-*}}
636 # CHECK: PASS: shtest-shell :: valid-shell.txt
637 # CHECK: Unresolved Tests (1)
638 # CHECK: Failed Tests (36)