blob: 5bf38ebd08f2128dc78c4b7186d950194a8ce0f5 [file] [log] [blame]
Daniel Dunbar38d37982013-01-31 22:15:20 +00001# Check the internal shell handling component of the ShTest format.
2#
3# RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out
Reid Kleckner125c74b2017-07-28 16:24:18 +00004# FIXME: Temporarily dump test output so we can debug failing tests on
5# buildbots.
6# RUN: cat %t.out
Joel E. Denny57046e82019-10-12 18:51:51 +00007# RUN: FileCheck --input-file %t.out %s
Daniel Dunbar38d37982013-01-31 22:15:20 +00008#
9# END.
10
11# CHECK: -- Testing:
12
Reid Kleckner82528922018-03-26 18:05:12 +000013# CHECK: FAIL: shtest-shell :: cat-error-0.txt
14# CHECK: *** TEST 'shtest-shell :: cat-error-0.txt' FAILED ***
15# CHECK: $ "cat" "-b" "temp1.txt"
16# CHECK: # command stderr:
17# CHECK: Unsupported: 'cat': option -b not recognized
18# CHECK: error: command failed with exit status: 1
19# CHECK: ***
20
21# CHECK: FAIL: shtest-shell :: cat-error-1.txt
22# CHECK: *** TEST 'shtest-shell :: cat-error-1.txt' FAILED ***
23# CHECK: $ "cat" "temp1.txt"
24# CHECK: # command stderr:
25# CHECK: [Errno 2] No such file or directory: 'temp1.txt'
26# CHECK: error: command failed with exit status: 1
27# CHECK: ***
Ying Yicfb08e92017-12-01 09:54:27 +000028
Joel E. Denny31b37392018-05-31 00:55:32 +000029# CHECK: FAIL: shtest-shell :: colon-error.txt
30# CHECK: *** TEST 'shtest-shell :: colon-error.txt' FAILED ***
31# CHECK: $ ":"
32# CHECK: # command stderr:
33# CHECK: Unsupported: ':' cannot be part of a pipeline
34# CHECK: error: command failed with exit status: 127
35# CHECK: ***
36
Joel E. Denny9658e772019-12-17 10:23:11 -050037# CHECK: PASS: shtest-shell :: dev-null.txt
38
39# CHECK: FAIL: shtest-shell :: diff-b.txt
40# CHECK: *** TEST 'shtest-shell :: diff-b.txt' FAILED ***
41# CHECK: $ "diff" "-b" "{{[^"]*}}.0" "{{[^"]*}}.1"
42# CHECK: # command output:
43# CHECK: 1,2
44# CHECK-NEXT: {{^ }}f o o
45# CHECK-NEXT: ! b a r
46# CHECK-NEXT: ---
47# CHECK-NEXT: {{^ }}f o o
48# CHECK-NEXT: ! bar
49# CHECK-EMPTY:
50# CHECK: error: command failed with exit status: 1
51# CHECK: ***
52
Joel E. Dennyf095b8c2019-10-16 17:21:24 +000053
54# CHECK: FAIL: shtest-shell :: diff-encodings.txt
55# CHECK: *** TEST 'shtest-shell :: diff-encodings.txt' FAILED ***
56
57# CHECK: $ "diff" "-u" "diff-in.bin" "diff-in.bin"
58# CHECK-NOT: error
59
60# CHECK: $ "diff" "-u" "diff-in.utf16" "diff-in.bin"
61# CHECK: # command output:
62# CHECK-NEXT: ---
63# CHECK-NEXT: +++
64# CHECK-NEXT: @@
65# CHECK-NEXT: {{^ .f.o.o.$}}
66# CHECK-NEXT: {{^-.b.a.r.$}}
67# CHECK-NEXT: {{^\+.b.a.r..}}
68# CHECK-NEXT: {{^ .b.a.z.$}}
69# CHECK: error: command failed with exit status: 1
70# CHECK: $ "true"
71
72# CHECK: $ "diff" "-u" "diff-in.utf8" "diff-in.bin"
73# CHECK: # command output:
74# CHECK-NEXT: ---
75# CHECK-NEXT: +++
76# CHECK-NEXT: @@
77# CHECK-NEXT: -foo
78# CHECK-NEXT: -bar
79# CHECK-NEXT: -baz
80# CHECK-NEXT: {{^\+.f.o.o.$}}
81# CHECK-NEXT: {{^\+.b.a.r..}}
82# CHECK-NEXT: {{^\+.b.a.z.$}}
83# CHECK: error: command failed with exit status: 1
84# CHECK: $ "true"
85
86# CHECK: $ "diff" "-u" "diff-in.bin" "diff-in.utf8"
87# CHECK: # command output:
88# CHECK-NEXT: ---
89# CHECK-NEXT: +++
90# CHECK-NEXT: @@
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: error: command failed with exit status: 1
98# CHECK: $ "true"
99
Joel E. Denny7c1d5362019-10-17 14:03:06 +0000100# CHECK: $ "cat" "diff-in.bin"
101# CHECK-NOT: error
102# CHECK: $ "diff" "-u" "-" "diff-in.bin"
103# CHECK-NOT: error
104
105# CHECK: $ "cat" "diff-in.bin"
106# CHECK-NOT: error
107# CHECK: $ "diff" "-u" "diff-in.bin" "-"
108# CHECK-NOT: error
109
110# CHECK: $ "cat" "diff-in.bin"
111# CHECK-NOT: error
112# CHECK: $ "diff" "-u" "diff-in.utf16" "-"
113# CHECK: # command output:
114# CHECK-NEXT: ---
115# CHECK-NEXT: +++
116# CHECK-NEXT: @@
117# CHECK-NEXT: {{^ .f.o.o.$}}
118# CHECK-NEXT: {{^-.b.a.r.$}}
119# CHECK-NEXT: {{^\+.b.a.r..}}
120# CHECK-NEXT: {{^ .b.a.z.$}}
121# CHECK: error: command failed with exit status: 1
122# CHECK: $ "true"
123
124# CHECK: $ "cat" "diff-in.bin"
125# CHECK-NOT: error
126# CHECK: $ "diff" "-u" "diff-in.utf8" "-"
127# CHECK: # command output:
128# CHECK-NEXT: ---
129# CHECK-NEXT: +++
130# CHECK-NEXT: @@
131# CHECK-NEXT: -foo
132# CHECK-NEXT: -bar
133# CHECK-NEXT: -baz
134# CHECK-NEXT: {{^\+.f.o.o.$}}
135# CHECK-NEXT: {{^\+.b.a.r..}}
136# CHECK-NEXT: {{^\+.b.a.z.$}}
137# CHECK: error: command failed with exit status: 1
138# CHECK: $ "true"
139
140# CHECK: $ "diff" "-u" "-" "diff-in.utf8"
141# CHECK: # command output:
142# CHECK-NEXT: ---
143# CHECK-NEXT: +++
144# CHECK-NEXT: @@
145# CHECK-NEXT: {{^\-.f.o.o.$}}
146# CHECK-NEXT: {{^\-.b.a.r..}}
147# CHECK-NEXT: {{^\-.b.a.z.$}}
148# CHECK-NEXT: +foo
149# CHECK-NEXT: +bar
150# CHECK-NEXT: +baz
151# CHECK: error: command failed with exit status: 1
152# CHECK: $ "true"
153
Joel E. Dennyf095b8c2019-10-16 17:21:24 +0000154# CHECK: $ "false"
155
156# CHECK: ***
157
158
Ying Yicfb08e92017-12-01 09:54:27 +0000159# CHECK: FAIL: shtest-shell :: diff-error-1.txt
160# CHECK: *** TEST 'shtest-shell :: diff-error-1.txt' FAILED ***
161# CHECK: $ "diff" "-B" "temp1.txt" "temp2.txt"
162# CHECK: # command stderr:
163# CHECK: Unsupported: 'diff': option -B not recognized
Joel E. Dennyb1638062019-10-17 14:02:42 +0000164# CHECK: error: command failed with exit status: 1
Ying Yicfb08e92017-12-01 09:54:27 +0000165# CHECK: ***
166
167# CHECK: FAIL: shtest-shell :: diff-error-2.txt
168# CHECK: *** TEST 'shtest-shell :: diff-error-2.txt' FAILED ***
169# CHECK: $ "diff" "temp.txt"
170# CHECK: # command stderr:
Joel E. Dennyb1638062019-10-17 14:02:42 +0000171# CHECK: Error: missing or extra operand
172# CHECK: error: command failed with exit status: 1
Ying Yicfb08e92017-12-01 09:54:27 +0000173# CHECK: ***
174
175# CHECK: FAIL: shtest-shell :: diff-error-3.txt
176# CHECK: *** TEST 'shtest-shell :: diff-error-3.txt' FAILED ***
177# CHECK: $ "diff" "temp.txt" "temp1.txt"
178# CHECK: # command stderr:
179# CHECK: Error: 'diff' command failed
180# CHECK: error: command failed with exit status: 1
181# CHECK: ***
182
183# CHECK: FAIL: shtest-shell :: diff-error-4.txt
184# CHECK: *** TEST 'shtest-shell :: diff-error-4.txt' FAILED ***
185# CHECK: Exit Code: 1
186# CHECK: # command output:
187# CHECK: diff-error-4.txt.tmp
188# CHECK: diff-error-4.txt.tmp1
189# CHECK: *** 1 ****
190# CHECK: ! hello-first
191# CHECK: --- 1 ----
192# CHECK: ! hello-second
193# CHECK: ***
194
195# CHECK: FAIL: shtest-shell :: diff-error-5.txt
196# CHECK: *** TEST 'shtest-shell :: diff-error-5.txt' FAILED ***
197# CHECK: $ "diff"
198# CHECK: # command stderr:
Joel E. Dennyb1638062019-10-17 14:02:42 +0000199# CHECK: Error: missing or extra operand
200# CHECK: error: command failed with exit status: 1
Ying Yicfb08e92017-12-01 09:54:27 +0000201# CHECK: ***
202
203# CHECK: FAIL: shtest-shell :: diff-error-6.txt
204# CHECK: *** TEST 'shtest-shell :: diff-error-6.txt' FAILED ***
205# CHECK: $ "diff"
206# CHECK: # command stderr:
Joel E. Dennyb1638062019-10-17 14:02:42 +0000207# CHECK: Error: missing or extra operand
208# CHECK: error: command failed with exit status: 1
Ying Yicfb08e92017-12-01 09:54:27 +0000209# CHECK: ***
210
Joel E. Dennyb1638062019-10-17 14:02:42 +0000211
212# CHECK: FAIL: shtest-shell :: diff-pipes.txt
213
214# CHECK: *** TEST 'shtest-shell :: diff-pipes.txt' FAILED ***
215
216# CHECK: $ "diff" "{{[^"]*}}.foo" "{{[^"]*}}.foo"
217# CHECK-NOT: note
218# CHECK-NOT: error
219# CHECK: $ "FileCheck"
220# CHECK-NOT: note
221# CHECK-NOT: error
222
223# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "{{[^"]*}}.bar"
224# CHECK: note: command had no output on stdout or stderr
225# CHECK: error: command failed with exit status: 1
226# CHECK: $ "FileCheck"
227# CHECK-NOT: note
228# CHECK-NOT: error
229# CHECK: $ "true"
230
Joel E. Denny7c1d5362019-10-17 14:03:06 +0000231# CHECK: $ "cat" "{{[^"]*}}.foo"
232# CHECK: $ "diff" "-u" "-" "{{[^"]*}}.foo"
233# CHECK-NOT: note
234# CHECK-NOT: error
235
236# CHECK: $ "cat" "{{[^"]*}}.foo"
237# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "-"
238# CHECK-NOT: note
239# CHECK-NOT: error
240
241# CHECK: $ "cat" "{{[^"]*}}.bar"
242# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "-"
243# CHECK: # command output:
244# CHECK: @@
245# CHECK-NEXT: -foo
246# CHECK-NEXT: +bar
247# CHECK: error: command failed with exit status: 1
248# CHECK: $ "true"
249
250# CHECK: $ "cat" "{{[^"]*}}.bar"
251# CHECK: $ "diff" "-u" "-" "{{[^"]*}}.foo"
252# CHECK: # command output:
253# CHECK: @@
254# CHECK-NEXT: -bar
255# CHECK-NEXT: +foo
256# CHECK: error: command failed with exit status: 1
257# CHECK: $ "true"
258
259# CHECK: $ "cat" "{{[^"]*}}.foo"
260# CHECK: $ "diff" "-" "{{[^"]*}}.foo"
261# CHECK-NOT: note
262# CHECK-NOT: error
263# CHECK: $ "FileCheck"
264# CHECK-NOT: note
265# CHECK-NOT: error
266
267# CHECK: $ "cat" "{{[^"]*}}.bar"
268# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "-"
269# CHECK: note: command had no output on stdout or stderr
270# CHECK: error: command failed with exit status: 1
271# CHECK: $ "FileCheck"
272# CHECK-NOT: note
273# CHECK-NOT: error
274# CHECK: $ "true"
275
Joel E. Dennyb1638062019-10-17 14:02:42 +0000276# CHECK: $ "false"
277
278# CHECK: ***
279
280
Max Moroz975eaca2018-01-09 18:23:34 +0000281# CHECK: FAIL: shtest-shell :: diff-r-error-0.txt
282# CHECK: *** TEST 'shtest-shell :: diff-r-error-0.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000283# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000284# CHECK: # command output:
285# CHECK: Only in {{.*}}dir1: dir1unique
286# CHECK: Only in {{.*}}dir2: dir2unique
287# CHECK: error: command failed with exit status: 1
288
289# CHECK: FAIL: shtest-shell :: diff-r-error-1.txt
290# CHECK: *** TEST 'shtest-shell :: diff-r-error-1.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000291# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000292# CHECK: # command output:
293# CHECK: *** {{.*}}dir1{{.*}}subdir{{.*}}f01
294# CHECK: --- {{.*}}dir2{{.*}}subdir{{.*}}f01
295# CHECK: 12345
296# CHECK: 00000
297# CHECK: error: command failed with exit status: 1
298
299# CHECK: FAIL: shtest-shell :: diff-r-error-2.txt
300# CHECK: *** TEST 'shtest-shell :: diff-r-error-2.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000301# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000302# CHECK: # command output:
303# CHECK: Only in {{.*}}dir2: extrafile
304# CHECK: error: command failed with exit status: 1
305
306# CHECK: FAIL: shtest-shell :: diff-r-error-3.txt
307# CHECK: *** TEST 'shtest-shell :: diff-r-error-3.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000308# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000309# CHECK: # command output:
310# CHECK: Only in {{.*}}dir1: extra_subdir
311# CHECK: error: command failed with exit status: 1
312
313# CHECK: FAIL: shtest-shell :: diff-r-error-4.txt
314# CHECK: *** TEST 'shtest-shell :: diff-r-error-4.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000315# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000316# CHECK: # command output:
317# CHECK: File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file
318# CHECK: error: command failed with exit status: 1
319
320# CHECK: FAIL: shtest-shell :: diff-r-error-5.txt
321# CHECK: *** TEST 'shtest-shell :: diff-r-error-5.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000322# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000323# CHECK: # command output:
324# CHECK: Only in {{.*}}dir1: extra_subdir
325# CHECK: error: command failed with exit status: 1
326
327# CHECK: FAIL: shtest-shell :: diff-r-error-6.txt
328# CHECK: *** TEST 'shtest-shell :: diff-r-error-6.txt' FAILED ***
Dmitri Gribenko60e52f52019-02-28 10:58:13 +0000329# CHECK: $ "diff" "-r"
Max Moroz975eaca2018-01-09 18:23:34 +0000330# CHECK: # command output:
331# CHECK: File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory
332# CHECK: error: command failed with exit status: 1
333
Joel E. Denny7c1d5362019-10-17 14:03:06 +0000334# CHECK: FAIL: shtest-shell :: diff-r-error-7.txt
335# CHECK: *** TEST 'shtest-shell :: diff-r-error-7.txt' FAILED ***
336# CHECK: $ "diff" "-r" "-" "{{[^"]*}}"
337# CHECK: # command stderr:
338# CHECK: Error: cannot recursively compare '-'
339# CHECK: error: command failed with exit status: 1
340
341# CHECK: FAIL: shtest-shell :: diff-r-error-8.txt
342# CHECK: *** TEST 'shtest-shell :: diff-r-error-8.txt' FAILED ***
343# CHECK: $ "diff" "-r" "{{[^"]*}}" "-"
344# CHECK: # command stderr:
345# CHECK: Error: cannot recursively compare '-'
346# CHECK: error: command failed with exit status: 1
347
Max Moroz975eaca2018-01-09 18:23:34 +0000348# CHECK: PASS: shtest-shell :: diff-r.txt
349
Joel E. Denny26224192019-10-16 17:21:57 +0000350
351# CHECK: FAIL: shtest-shell :: diff-strip-trailing-cr.txt
352
353# CHECK: *** TEST 'shtest-shell :: diff-strip-trailing-cr.txt' FAILED ***
354
355# CHECK: $ "diff" "-u" "diff-in.dos" "diff-in.unix"
356# CHECK: # command output:
357# CHECK: @@
358# CHECK-NEXT: -In this file, the
359# CHECK-NEXT: -sequence "\r\n"
360# CHECK-NEXT: -terminates lines.
361# CHECK-NEXT: +In this file, the
362# CHECK-NEXT: +sequence "\n"
363# CHECK-NEXT: +terminates lines.
364# CHECK: error: command failed with exit status: 1
365# CHECK: $ "true"
366
367# CHECK: $ "diff" "-u" "diff-in.unix" "diff-in.dos"
368# CHECK: # command output:
369# CHECK: @@
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: error: command failed with exit status: 1
377# CHECK: $ "true"
378
379# CHECK: $ "diff" "-u" "--strip-trailing-cr" "diff-in.dos" "diff-in.unix"
380# CHECK: # command output:
381# CHECK: @@
382# CHECK-NEXT: In this file, the
383# CHECK-NEXT: -sequence "\r\n"
384# CHECK-NEXT: +sequence "\n"
385# CHECK-NEXT: terminates lines.
386# CHECK: error: command failed with exit status: 1
387# CHECK: $ "true"
388
389# CHECK: $ "diff" "-u" "--strip-trailing-cr" "diff-in.unix" "diff-in.dos"
390# CHECK: # command output:
391# CHECK: @@
392# CHECK-NEXT: In this file, the
393# CHECK-NEXT: -sequence "\n"
394# CHECK-NEXT: +sequence "\r\n"
395# CHECK-NEXT: terminates lines.
396# CHECK: error: command failed with exit status: 1
397# CHECK: $ "true"
398
399# CHECK: $ "false"
400
401# CHECK: ***
402
403
Joel E. Denny7e385bd2019-10-14 19:59:30 +0000404# CHECK: FAIL: shtest-shell :: diff-unified.txt
405
406# CHECK: *** TEST 'shtest-shell :: diff-unified.txt' FAILED ***
407
408# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "{{[^"]*}}.bar"
409# CHECK: # command output:
410# CHECK: @@ {{.*}} @@
411# CHECK-NEXT: 3
412# CHECK-NEXT: 4
413# CHECK-NEXT: 5
414# CHECK-NEXT: -6 foo
415# CHECK-NEXT: +6 bar
416# CHECK-NEXT: 7
417# CHECK-NEXT: 8
418# CHECK-NEXT: 9
419# CHECK-EMPTY:
420# CHECK-NEXT: error: command failed with exit status: 1
421# CHECK-NEXT: $ "true"
422
423# CHECK: $ "diff" "-U" "2" "{{[^"]*}}.foo" "{{[^"]*}}.bar"
424# CHECK: # command output:
425# CHECK: @@ {{.*}} @@
426# CHECK-NEXT: 4
427# CHECK-NEXT: 5
428# CHECK-NEXT: -6 foo
429# CHECK-NEXT: +6 bar
430# CHECK-NEXT: 7
431# CHECK-NEXT: 8
432# CHECK-EMPTY:
433# CHECK-NEXT: error: command failed with exit status: 1
434# CHECK-NEXT: $ "true"
435
436# CHECK: $ "diff" "-U4" "{{[^"]*}}.foo" "{{[^"]*}}.bar"
437# CHECK: # command output:
438# CHECK: @@ {{.*}} @@
439# CHECK-NEXT: 2
440# CHECK-NEXT: 3
441# CHECK-NEXT: 4
442# CHECK-NEXT: 5
443# CHECK-NEXT: -6 foo
444# CHECK-NEXT: +6 bar
445# CHECK-NEXT: 7
446# CHECK-NEXT: 8
447# CHECK-NEXT: 9
448# CHECK-NEXT: 10
449# CHECK-EMPTY:
450# CHECK-NEXT: error: command failed with exit status: 1
451# CHECK-NEXT: $ "true"
452
453# CHECK: $ "diff" "-U0" "{{[^"]*}}.foo" "{{[^"]*}}.bar"
454# CHECK: # command output:
455# CHECK: @@ {{.*}} @@
456# CHECK-NEXT: -6 foo
457# CHECK-NEXT: +6 bar
458# CHECK-EMPTY:
459# CHECK-NEXT: error: command failed with exit status: 1
460# CHECK-NEXT: $ "true"
461
Joel E. Dennyb1638062019-10-17 14:02:42 +0000462# CHECK: $ "diff" "-U" "30.1" "{{[^"]*}}" "{{[^"]*}}"
463# CHECK: # command stderr:
464# CHECK: Error: invalid '-U' argument: 30.1
465# CHECK: error: command failed with exit status: 1
466# CHECK: $ "true"
467
468# CHECK: $ "diff" "-U-1" "{{[^"]*}}" "{{[^"]*}}"
469# CHECK: # command stderr:
470# CHECK: Error: invalid '-U' argument: -1
471# CHECK: error: command failed with exit status: 1
472# CHECK: $ "true"
473
Joel E. Denny7e385bd2019-10-14 19:59:30 +0000474# CHECK: $ "false"
475
476# CHECK: ***
477
478
Joel E. Denny9658e772019-12-17 10:23:11 -0500479# CHECK: FAIL: shtest-shell :: diff-w.txt
480# CHECK: *** TEST 'shtest-shell :: diff-w.txt' FAILED ***
481# CHECK: $ "diff" "-w" "{{[^"]*}}.0" "{{[^"]*}}.1"
482# CHECK: # command output:
483# CHECK: 1,3
484# CHECK-NEXT: {{^ }}foo
485# CHECK-NEXT: {{^ }}bar
486# CHECK-NEXT: ! baz
487# CHECK-NEXT: ---
488# CHECK-NEXT: {{^ }}foo
489# CHECK-NEXT: {{^ }}bar
490# CHECK-NEXT: ! bat
491# CHECK-EMPTY:
492# CHECK: error: command failed with exit status: 1
493# CHECK: ***
494
Daniel Dunbar38d37982013-01-31 22:15:20 +0000495# CHECK: FAIL: shtest-shell :: error-0.txt
496# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***
Daniel Dunbar591838d2016-06-02 23:49:42 +0000497# CHECK: $ "not-a-real-command"
498# CHECK: # command stderr:
Daniel Dunbar38d37982013-01-31 22:15:20 +0000499# CHECK: 'not-a-real-command': command not found
Daniel Dunbar591838d2016-06-02 23:49:42 +0000500# CHECK: error: command failed with exit status: 127
Daniel Dunbar38d37982013-01-31 22:15:20 +0000501# CHECK: ***
502
503# FIXME: The output here sucks.
504#
505# CHECK: FAIL: shtest-shell :: error-1.txt
506# CHECK: *** TEST 'shtest-shell :: error-1.txt' FAILED ***
Joel E. Dennyfc01dd22018-05-31 03:40:37 +0000507# CHECK: shell parser error on: ': \'RUN: at line 3\'; echo "missing quote'
Daniel Dunbar38d37982013-01-31 22:15:20 +0000508# CHECK: ***
509
510# CHECK: FAIL: shtest-shell :: error-2.txt
511# CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED ***
512# CHECK: Unsupported redirect:
513# CHECK: ***
514
Ying Yicfb08e92017-12-01 09:54:27 +0000515# CHECK: FAIL: shtest-shell :: mkdir-error-0.txt
516# CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED ***
517# CHECK: $ "mkdir" "-p" "temp"
518# CHECK: # command stderr:
519# CHECK: Unsupported: 'mkdir' cannot be part of a pipeline
520# CHECK: error: command failed with exit status: 127
521# CHECK: ***
522
523# CHECK: FAIL: shtest-shell :: mkdir-error-1.txt
524# CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED ***
525# CHECK: $ "mkdir" "-p" "-m" "777" "temp"
526# CHECK: # command stderr:
527# CHECK: Unsupported: 'mkdir': option -m not recognized
528# CHECK: error: command failed with exit status: 127
529# CHECK: ***
530
531# CHECK: FAIL: shtest-shell :: mkdir-error-2.txt
532# CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED ***
533# CHECK: $ "mkdir" "-p"
534# CHECK: # command stderr:
535# CHECK: Error: 'mkdir' is missing an operand
536# CHECK: error: command failed with exit status: 127
537# CHECK: ***
538
Daniel Dunbar38d37982013-01-31 22:15:20 +0000539# CHECK: PASS: shtest-shell :: redirects.txt
Ying Yicfb08e92017-12-01 09:54:27 +0000540
541# CHECK: FAIL: shtest-shell :: rm-error-0.txt
542# CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED ***
543# CHECK: $ "rm" "-rf" "temp"
544# CHECK: # command stderr:
545# CHECK: Unsupported: 'rm' cannot be part of a pipeline
546# CHECK: error: command failed with exit status: 127
547# CHECK: ***
548
549# CHECK: FAIL: shtest-shell :: rm-error-1.txt
550# CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED ***
551# CHECK: $ "rm" "-f" "-v" "temp"
552# CHECK: # command stderr:
553# CHECK: Unsupported: 'rm': option -v not recognized
554# CHECK: error: command failed with exit status: 127
555# CHECK: ***
556
557# CHECK: FAIL: shtest-shell :: rm-error-2.txt
558# CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED ***
559# CHECK: $ "rm" "-r" "hello"
560# CHECK: # command stderr:
561# CHECK: Error: 'rm' command failed
562# CHECK: error: command failed with exit status: 1
563# CHECK: ***
564
565# CHECK: FAIL: shtest-shell :: rm-error-3.txt
566# CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED ***
567# CHECK: Exit Code: 1
568# CHECK: ***
569
Serge Guelton54be9092019-02-28 19:16:17 +0000570# CHECK: PASS: shtest-shell :: rm-unicode-0.txt
Daniel Dunbar38d37982013-01-31 22:15:20 +0000571# CHECK: PASS: shtest-shell :: sequencing-0.txt
572# CHECK: XFAIL: shtest-shell :: sequencing-1.txt
Joel E. Denny27fdf8a2019-10-18 12:53:45 -0400573
574# CHECK: FAIL: shtest-shell :: stdout-encoding.txt
575# CHECK: *** TEST 'shtest-shell :: stdout-encoding.txt' FAILED ***
576# CHECK: $ "cat" "diff-in.bin"
577# CHECK: # command output:
578# CHECK-NEXT: {{^.f.o.o.$}}
579# CHECK-NEXT: {{^.b.a.r..}}
580# CHECK-NEXT: {{^.b.a.z.$}}
581# CHECK-NOT: error
582# CHECK: $ "false"
583# CHECK: ***
584
Ying Yicfb08e92017-12-01 09:54:27 +0000585# CHECK: PASS: shtest-shell :: valid-shell.txt
Joel E. Denny9658e772019-12-17 10:23:11 -0500586# CHECK: Failing Tests (35)