642 lines · python
1# Check the internal shell handling component of the ShTest format.2 3# RUN: not %{lit} -v %{inputs}/shtest-shell > %t.out4# RUN: FileCheck --input-file %t.out %s5#6# Test again in non-UTF shell to catch potential errors with python 2 seen7# on stdout-encoding.txt8# RUN: env PYTHONIOENCODING=ascii not %{lit} -a %{inputs}/shtest-shell > %t.ascii.out9# RUN: FileCheck --input-file %t.ascii.out %s10#11# END.12 13# CHECK: -- Testing:14 15# CHECK: UNRESOLVED: shtest-shell :: capital-t-error-message.txt16# CHECK: *** TEST 'shtest-shell :: capital-t-error-message.txt' FAILED ***17# CHECK: ValueError: %T is no longer supported. Please create directories with names based on %t.18 19# CHECK: FAIL: shtest-shell :: colon-error.txt20# CHECK: *** TEST 'shtest-shell :: colon-error.txt' FAILED ***21# CHECK: :22# CHECK: # .---command stderr{{-*}}23# CHECK: # | Unsupported: ':' cannot be part of a pipeline24# CHECK: # error: command failed with exit status: 12725# CHECK: ***26 27# CHECK: PASS: shtest-shell :: continuations.txt28 29# CHECK: PASS: shtest-shell :: dev-null.txt30 31# CHECK: FAIL: shtest-shell :: diff-b.txt32# CHECK: *** TEST 'shtest-shell :: diff-b.txt' FAILED ***33# CHECK: diff -b {{[^"]*}}.0 {{[^"]*}}.134# CHECK: # .---command stdout{{-*}}35# CHECK: # | {{.*}}1,236# CHECK-NEXT: # | f o o37# CHECK-NEXT: # | ! b a r38# CHECK-NEXT: # | ---39# CHECK-NEXT: # | f o o40# CHECK-NEXT: # | ! bar41# CHECK-NEXT: # `---{{-*}}42# CHECK-NEXT: # error: command failed with exit status: 143# CHECK: ***44 45 46# CHECK: FAIL: shtest-shell :: diff-encodings.txt47# CHECK: *** TEST 'shtest-shell :: diff-encodings.txt' FAILED ***48 49# CHECK: diff -u diff-in.bin diff-in.bin50# CHECK-NEXT: # executed command: diff -u diff-in.bin diff-in.bin51# CHECK-NOT: error52 53# CHECK: diff -u diff-in.utf16 diff-in.bin && false || true54# CHECK-NEXT: # executed command: diff -u diff-in.utf16 diff-in.bin55# CHECK-NEXT: # .---command stdout{{-*}}56# CHECK-NEXT: # | ---57# CHECK-NEXT: # | +++58# CHECK-NEXT: # | @@59# CHECK-NEXT: # | {{.f.o.o.$}}60# CHECK-NEXT: # | {{-.b.a.r.$}}61# CHECK-NEXT: # | {{\+.b.a.r.}}62# CHECK-NEXT: # | {{.b.a.z.$}}63# CHECK-NEXT: # `---{{-*}}64# CHECK-NEXT: # error: command failed with exit status: 165# CHECK-NEXT: # executed command: true66 67# CHECK: diff -u diff-in.utf8 diff-in.bin && false || true68# CHECK-NEXT: # executed command: diff -u diff-in.utf8 diff-in.bin69# CHECK-NEXT: # .---command stdout{{-*}}70# CHECK-NEXT: # | ---71# CHECK-NEXT: # | +++72# CHECK-NEXT: # | @@73# CHECK-NEXT: # | -foo74# CHECK-NEXT: # | -bar75# CHECK-NEXT: # | -baz76# CHECK-NEXT: # | {{\+.f.o.o.$}}77# CHECK-NEXT: # | {{\+.b.a.r.}}78# CHECK-NEXT: # | {{\+.b.a.z.$}}79# CHECK-NEXT: # `---{{-*}}80# CHECK-NEXT: # error: command failed with exit status: 181# CHECK-NEXT: # executed command: true82 83# CHECK: diff -u diff-in.bin diff-in.utf8 && false || true84# CHECK-NEXT: # executed command: diff -u diff-in.bin diff-in.utf885# CHECK-NEXT: # .---command stdout{{-*}}86# CHECK-NEXT: # | ---87# CHECK-NEXT: # | +++88# CHECK-NEXT: # | @@89# CHECK-NEXT: # | {{-.f.o.o.$}}90# CHECK-NEXT: # | {{-.b.a.r.}}91# CHECK-NEXT: # | {{-.b.a.z.$}}92# CHECK-NEXT: # | +foo93# CHECK-NEXT: # | +bar94# CHECK-NEXT: # | +baz95# CHECK-NEXT: # `---{{-*}}96# CHECK-NEXT: # error: command failed with exit status: 197# CHECK-NEXT: # executed command: true98 99# CHECK: cat diff-in.bin | diff -u - diff-in.bin100# CHECK-NOT: error101 102# CHECK: cat diff-in.bin | diff -u diff-in.bin -103# CHECK-NOT: error104 105# CHECK: cat diff-in.bin | diff -u diff-in.utf16 - && false || true106# CHECK-NEXT: # executed command: cat diff-in.bin107# CHECK-NEXT: # executed command: diff -u diff-in.utf16 -108# CHECK-NEXT: # .---command stdout{{-*}}109# CHECK-NEXT: # | ---110# CHECK-NEXT: # | +++111# CHECK-NEXT: # | @@112# CHECK-NEXT: # | {{.f.o.o.$}}113# CHECK-NEXT: # | {{-.b.a.r.$}}114# CHECK-NEXT: # | {{\+.b.a.r.}}115# CHECK-NEXT: # | {{.b.a.z.$}}116# CHECK-NEXT: # `---{{-*}}117# CHECK-NEXT: # error: command failed with exit status: 1118# CHECK-NEXT: # executed command: true119 120# CHECK: cat diff-in.bin | diff -u diff-in.utf8 - && false || true121# CHECK-NEXT: # executed command: cat diff-in.bin122# CHECK-NEXT: # executed command: diff -u diff-in.utf8 -123# CHECK-NEXT: # .---command stdout{{-*}}124# CHECK-NEXT: # | ---125# CHECK-NEXT: # | +++126# CHECK-NEXT: # | @@127# CHECK-NEXT: # | -foo128# CHECK-NEXT: # | -bar129# CHECK-NEXT: # | -baz130# CHECK-NEXT: # | {{\+.f.o.o.$}}131# CHECK-NEXT: # | {{\+.b.a.r.}}132# CHECK-NEXT: # | {{\+.b.a.z.$}}133# CHECK-NEXT: # `---{{-*}}134# CHECK-NEXT: # error: command failed with exit status: 1135# CHECK-NEXT: # executed command: true136 137# CHECK: cat diff-in.bin | diff -u - diff-in.utf8 && false || true138# CHECK-NEXT: # executed command: cat diff-in.bin139# CHECK-NEXT: # executed command: diff -u - diff-in.utf8140# CHECK-NEXT: # .---command stdout{{-*}}141# CHECK-NEXT: # | ---142# CHECK-NEXT: # | +++143# CHECK-NEXT: # | @@144# CHECK-NEXT: # | {{-.f.o.o.$}}145# CHECK-NEXT: # | {{-.b.a.r.}}146# CHECK-NEXT: # | {{-.b.a.z.$}}147# CHECK-NEXT: # | +foo148# CHECK-NEXT: # | +bar149# CHECK-NEXT: # | +baz150# CHECK-NEXT: # `---{{-*}}151# CHECK-NEXT: # error: command failed with exit status: 1152# CHECK-NEXT: # executed command: true153 154# CHECK: false155 156# CHECK: ***157 158 159# CHECK: FAIL: shtest-shell :: diff-error-1.txt160# CHECK: *** TEST 'shtest-shell :: diff-error-1.txt' FAILED ***161# CHECK: diff -B temp1.txt temp2.txt162# CHECK: # .---command stderr{{-*}}163# CHECK: # | Unsupported: 'diff': option -B not recognized164# CHECK: # error: command failed with exit status: 1165# CHECK: ***166 167# CHECK: FAIL: shtest-shell :: diff-error-2.txt168# CHECK: *** TEST 'shtest-shell :: diff-error-2.txt' FAILED ***169# CHECK: diff temp.txt170# CHECK: # .---command stderr{{-*}}171# CHECK: # | Error: missing or extra operand172# CHECK: # error: command failed with exit status: 1173# CHECK: ***174 175# CHECK: FAIL: shtest-shell :: diff-error-3.txt176# CHECK: *** TEST 'shtest-shell :: diff-error-3.txt' FAILED ***177# CHECK: diff temp.txt temp1.txt178# CHECK: # .---command stderr{{-*}}179# CHECK: # | Error: 'diff' command failed180# CHECK: error: command failed with exit status: 1181# CHECK: ***182 183# CHECK: FAIL: shtest-shell :: diff-error-4.txt184# CHECK: *** TEST 'shtest-shell :: diff-error-4.txt' FAILED ***185# CHECK: Exit Code: 1186# CHECK: # .---command stdout{{-*}}187# CHECK-NEXT: # | {{.*}}diff-error-4.txt.tmp188# CHECK-NEXT: # | {{.*}}diff-error-4.txt.tmp1189# CHECK-NEXT: # | {{\*+}}190# CHECK-NEXT: # | *** 1 ****191# CHECK-NEXT: # | ! hello-first192# CHECK-NEXT: # | --- 1 ----193# CHECK-NEXT: # | ! hello-second194# CHECK-NEXT: # `---{{-*}}195# CHECK: ***196 197# CHECK: FAIL: shtest-shell :: diff-error-5.txt198# CHECK: *** TEST 'shtest-shell :: diff-error-5.txt' FAILED ***199# CHECK: diff200# CHECK: # .---command stderr{{-*}}201# CHECK: # | Error: missing or extra operand202# CHECK: # error: command failed with exit status: 1203# CHECK: ***204 205# CHECK: FAIL: shtest-shell :: diff-error-6.txt206# CHECK: *** TEST 'shtest-shell :: diff-error-6.txt' FAILED ***207# CHECK: diff208# CHECK: # .---command stderr{{-*}}209# CHECK: # | Error: missing or extra operand210# CHECK: # error: command failed with exit status: 1211# CHECK: ***212 213 214# CHECK: FAIL: shtest-shell :: diff-pipes.txt215 216# CHECK: *** TEST 'shtest-shell :: diff-pipes.txt' FAILED ***217 218# CHECK: diff {{[^ ]*}}.foo {{.*}}.foo | FileCheck {{.*}}219# CHECK-NOT: note220# CHECK-NOT: error221 222# CHECK: diff -u {{.*}}.foo {{.*}}.bar | FileCheck {{.*}} && false || true223# CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}224# CHECK-NEXT: # note: command had no output on stdout or stderr225# CHECK-NEXT: # error: command failed with exit status: 1226# CHECK-NEXT: # executed command: FileCheck227# CHECK-NEXT: # executed command: true228 229# CHECK: cat {{.*}}.foo | diff -u - {{.*}}.foo230# CHECK-NOT: note231# CHECK-NOT: error232 233# CHECK: cat {{.*}}.foo | diff -u {{.*}}.foo -234# CHECK-NOT: note235# CHECK-NOT: error236 237# CHECK: cat {{.*}}.bar | diff -u {{.*}}.foo - && false || true238# CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}239# CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} -240# CHECK-NEXT: # .---command stdout{{-*}}241# CHECK: # | @@242# CHECK-NEXT: # | -foo243# CHECK-NEXT: # | +bar244# CHECK-NEXT: # `---{{-*}}245# CHECK-NEXT: # error: command failed with exit status: 1246# CHECK-NEXT: # executed command: true247 248# CHECK: cat {{.*}}.bar | diff -u - {{.*}}.foo && false || true249# CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}250# CHECK-NEXT: # executed command: diff -u - {{.+}}.foo{{.*}}251# CHECK-NEXT: # .---command stdout{{-*}}252# CHECK: # | @@253# CHECK-NEXT: # | -bar254# CHECK-NEXT: # | +foo255# CHECK-NEXT: # `---{{-*}}256# CHECK-NEXT: # error: command failed with exit status: 1257# CHECK-NEXT: # executed command: true258 259# CHECK: cat {{.*}}.foo | diff - {{.*}}.foo | FileCheck {{.*}}260# CHECK-NOT: note261# CHECK-NOT: error262 263# CHECK: cat {{.*}}.bar | diff -u {{.*}}.foo - | FileCheck {{.*}}264# CHECK-NEXT: # executed command: cat {{.+}}.bar{{.*}}265# CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} -266# CHECK-NEXT: note: command had no output on stdout or stderr267# CHECK-NEXT: error: command failed with exit status: 1268# CHECK-NEXT: # executed command: FileCheck269# CHECK-NEXT: # executed command: true270 271# CHECK: false272 273# CHECK: ***274 275 276# CHECK: FAIL: shtest-shell :: diff-r-error-0.txt277# CHECK: *** TEST 'shtest-shell :: diff-r-error-0.txt' FAILED ***278# CHECK: diff -r279# CHECK: # .---command stdout{{-*}}280# CHECK: # | Only in {{.*}}dir1: dir1unique281# CHECK: # | Only in {{.*}}dir2: dir2unique282# CHECK: # error: command failed with exit status: 1283 284# CHECK: FAIL: shtest-shell :: diff-r-error-1.txt285# CHECK: *** TEST 'shtest-shell :: diff-r-error-1.txt' FAILED ***286# CHECK: diff -r287# CHECK: # .---command stdout{{-*}}288# CHECK: # | *** {{.*}}dir1{{.*}}subdir{{.*}}f01289# CHECK: # | --- {{.*}}dir2{{.*}}subdir{{.*}}f01290# CHECK: # | ! 12345291# CHECK: # | ! 00000292# CHECK: # error: command failed with exit status: 1293 294# CHECK: FAIL: shtest-shell :: diff-r-error-2.txt295# CHECK: *** TEST 'shtest-shell :: diff-r-error-2.txt' FAILED ***296# CHECK: diff -r297# CHECK: # .---command stdout{{-*}}298# CHECK: # | Only in {{.*}}dir2: extrafile299# CHECK: # error: command failed with exit status: 1300 301# CHECK: FAIL: shtest-shell :: diff-r-error-3.txt302# CHECK: *** TEST 'shtest-shell :: diff-r-error-3.txt' FAILED ***303# CHECK: diff -r304# CHECK: # .---command stdout{{-*}}305# CHECK: # | Only in {{.*}}dir1: extra_subdir306# CHECK: # error: command failed with exit status: 1307 308# CHECK: FAIL: shtest-shell :: diff-r-error-4.txt309# CHECK: *** TEST 'shtest-shell :: diff-r-error-4.txt' FAILED ***310# CHECK: diff -r311# CHECK: # .---command stdout{{-*}}312# CHECK: # | File {{.*}}dir1{{.*}}extra_subdir is a directory while file {{.*}}dir2{{.*}}extra_subdir is a regular file313# CHECK: # error: command failed with exit status: 1314 315# CHECK: FAIL: shtest-shell :: diff-r-error-5.txt316# CHECK: *** TEST 'shtest-shell :: diff-r-error-5.txt' FAILED ***317# CHECK: diff -r318# CHECK: # .---command stdout{{-*}}319# CHECK: # | Only in {{.*}}dir1: extra_subdir320# CHECK: # error: command failed with exit status: 1321 322# CHECK: FAIL: shtest-shell :: diff-r-error-6.txt323# CHECK: *** TEST 'shtest-shell :: diff-r-error-6.txt' FAILED ***324# CHECK: diff -r325# CHECK: # .---command stdout{{-*}}326# CHECK: # | File {{.*}}dir1{{.*}}extra_file is a regular empty file while file {{.*}}dir2{{.*}}extra_file is a directory327# CHECK: # error: command failed with exit status: 1328 329# CHECK: FAIL: shtest-shell :: diff-r-error-7.txt330# CHECK: *** TEST 'shtest-shell :: diff-r-error-7.txt' FAILED ***331# CHECK: diff -r - {{.*}}332# CHECK: # .---command stderr{{-*}}333# CHECK: # | Error: cannot recursively compare '-'334# CHECK: # error: command failed with exit status: 1335 336# CHECK: FAIL: shtest-shell :: diff-r-error-8.txt337# CHECK: *** TEST 'shtest-shell :: diff-r-error-8.txt' FAILED ***338# CHECK: diff -r {{.*}} -339# CHECK: # .---command stderr{{-*}}340# CHECK: # | Error: cannot recursively compare '-'341# CHECK: # error: command failed with exit status: 1342 343# CHECK: PASS: shtest-shell :: diff-r.txt344 345 346# CHECK: FAIL: shtest-shell :: diff-strip-trailing-cr.txt347 348# CHECK: *** TEST 'shtest-shell :: diff-strip-trailing-cr.txt' FAILED ***349 350# CHECK: diff -u diff-in.dos diff-in.unix && false || true351# CHECK-NEXT: # executed command: diff -u diff-in.dos diff-in.unix352# CHECK-NEXT: # .---command stdout{{-*}}353# CHECK: # | @@354# CHECK-NEXT: # | -In this file, the355# CHECK-NEXT: # | -sequence "\r\n"356# CHECK-NEXT: # | -terminates lines.357# CHECK-NEXT: # | +In this file, the358# CHECK-NEXT: # | +sequence "\n"359# CHECK-NEXT: # | +terminates lines.360# CHECK-NEXT: # `---{{-*}}361# CHECK-NEXT: # error: command failed with exit status: 1362# CHECK-NEXT: # executed command: true363 364# CHECK: diff -u diff-in.unix diff-in.dos && false || true365# CHECK-NEXT: # executed command: diff -u diff-in.unix diff-in.dos366# CHECK-NEXT: # .---command stdout{{-*}}367# CHECK: # | @@368# CHECK-NEXT: # | -In this file, the369# CHECK-NEXT: # | -sequence "\n"370# CHECK-NEXT: # | -terminates lines.371# CHECK-NEXT: # | +In this file, the372# CHECK-NEXT: # | +sequence "\r\n"373# CHECK-NEXT: # | +terminates lines.374# CHECK-NEXT: # `---{{-*}}375# CHECK-NEXT: # error: command failed with exit status: 1376# CHECK-NEXT: # executed command: true377 378# CHECK: diff -u --strip-trailing-cr diff-in.dos diff-in.unix && false || true379# CHECK-NEXT: executed command: diff -u --strip-trailing-cr diff-in.dos diff-in.unix380# CHECK-NEXT: # .---command stdout{{-*}}381# CHECK: # | @@382# CHECK-NEXT: # | In this file, the383# CHECK-NEXT: # | -sequence "\r\n"384# CHECK-NEXT: # | +sequence "\n"385# CHECK-NEXT: # | terminates lines.386# CHECK-NEXT: # `---{{-*}}387# CHECK-NEXT: # error: command failed with exit status: 1388# CHECK-NEXT: # executed command: true389 390# CHECK: diff -u --strip-trailing-cr diff-in.unix diff-in.dos && false || true391# CHECK-NEXT: # executed command: diff -u --strip-trailing-cr diff-in.unix diff-in.dos392# CHECK-NEXT: # .---command stdout{{-*}}393# CHECK: # | @@394# CHECK-NEXT: # | In this file, the395# CHECK-NEXT: # | -sequence "\n"396# CHECK-NEXT: # | +sequence "\r\n"397# CHECK-NEXT: # | terminates lines.398# CHECK-NEXT: # `---{{-*}}399# CHECK-NEXT: # error: command failed with exit status: 1400# CHECK-NEXT: # executed command: true401 402# CHECK: false403 404# CHECK: ***405 406 407# CHECK: FAIL: shtest-shell :: diff-unified.txt408 409# CHECK: *** TEST 'shtest-shell :: diff-unified.txt' FAILED ***410 411# CHECK: diff -u {{.*}}.foo {{.*}}.bar && false || true412# CHECK-NEXT: # executed command: diff -u {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}413# CHECK-NEXT: # .---command stdout{{-*}}414# CHECK: # | @@ {{.*}} @@415# CHECK-NEXT: # | 3416# CHECK-NEXT: # | 4417# CHECK-NEXT: # | 5418# CHECK-NEXT: # | -6 foo419# CHECK-NEXT: # | +6 bar420# CHECK-NEXT: # | 7421# CHECK-NEXT: # | 8422# CHECK-NEXT: # | 9423# CHECK-NEXT: # `---{{-*}}424# CHECK-NEXT: # error: command failed with exit status: 1425# CHECK-NEXT: # executed command: true426 427# CHECK: diff -U 2 {{.*}}.foo {{.*}}.bar && false || true428# CHECK-NEXT: # executed command: diff -U 2 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}429# CHECK-NEXT: # .---command stdout{{-*}}430# CHECK: # | @@ {{.*}} @@431# CHECK-NEXT: # | 4432# CHECK-NEXT: # | 5433# CHECK-NEXT: # | -6 foo434# CHECK-NEXT: # | +6 bar435# CHECK-NEXT: # | 7436# CHECK-NEXT: # | 8437# CHECK-NEXT: # `---{{-*}}438# CHECK-NEXT: # error: command failed with exit status: 1439# CHECK-NEXT: # executed command: true440 441# CHECK: diff -U4 {{.*}}.foo {{.*}}.bar && false || true442# CHECK-NEXT: # executed command: diff -U4 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}443# CHECK-NEXT: # .---command stdout{{-*}}444# CHECK: # | @@ {{.*}} @@445# CHECK-NEXT: # | 2446# CHECK-NEXT: # | 3447# CHECK-NEXT: # | 4448# CHECK-NEXT: # | 5449# CHECK-NEXT: # | -6 foo450# CHECK-NEXT: # | +6 bar451# CHECK-NEXT: # | 7452# CHECK-NEXT: # | 8453# CHECK-NEXT: # | 9454# CHECK-NEXT: # | 10455# CHECK-NEXT: # `---{{-*}}456# CHECK-NEXT: # error: command failed with exit status: 1457# CHECK-NEXT: # executed command: true458 459# CHECK: diff -U0 {{.*}}.foo {{.*}}.bar && false || true460# CHECK-NEXT: # executed command: diff -U0 {{.+}}.foo{{.*}} {{.+}}.bar{{.*}}461# CHECK-NEXT: # .---command stdout{{-*}}462# CHECK: # | @@ {{.*}} @@463# CHECK-NEXT: # | -6 foo464# CHECK-NEXT: # | +6 bar465# CHECK-NEXT: # `---{{-*}}466# CHECK-NEXT: # error: command failed with exit status: 1467# CHECK-NEXT: # executed command: true468 469# CHECK: diff -U 30.1 {{.*}} {{.*}} && false || true470# CHECK: # executed command: diff -U 30.1 {{.*}} {{.*}}471# CHECK: # .---command stderr{{-*}}472# CHECK: # | Error: invalid '-U' argument: 30.1473# CHECK: # error: command failed with exit status: 1474# CHECK: # executed command: true475 476# CHECK: diff -U-1 {{.*}} {{.*}} && false || true477# CHECK: # executed command: diff -U-1 {{.*}} {{.*}}478# CHECK: # .---command stderr{{-*}}479# CHECK: # | Error: invalid '-U' argument: -1480# CHECK: # error: command failed with exit status: 1481# CHECK: # executed command: true482 483# CHECK: false484 485# CHECK: ***486 487 488# CHECK: FAIL: shtest-shell :: diff-w.txt489# CHECK: *** TEST 'shtest-shell :: diff-w.txt' FAILED ***490# CHECK: diff -w {{.*}}.0 {{.*}}.1491# CHECK: # .---command stdout{{-*}}492# CHECK: # | {{\*+}} 1,3493# CHECK-NEXT: # | foo494# CHECK-NEXT: # | bar495# CHECK-NEXT: # | ! baz496# CHECK-NEXT: # | ---497# CHECK-NEXT: # | foo498# CHECK-NEXT: # | bar499# CHECK-NEXT: # | ! bat500# CHECK-NEXT: # `---{{-*}}501# CHECK-NEXT: # error: command failed with exit status: 1502# CHECK: ***503 504# CHECK: FAIL: shtest-shell :: echo-at-redirect-stderr.txt505# CHECK: *** TEST 'shtest-shell :: echo-at-redirect-stderr.txt' FAILED ***506# CHECK: @echo 2> {{.*}}507# CHECK: # executed command: @echo508# CHECK: # .---command stderr{{-*}}509# CHECK: # | stdin and stderr redirects not supported for @echo510# CHECK: error: command failed with exit status:511 512# CHECK: FAIL: shtest-shell :: echo-at-redirect-stdin.txt513# CHECK: *** TEST 'shtest-shell :: echo-at-redirect-stdin.txt' FAILED ***514# CHECK: @echo < {{.*}}515# CHECK: # executed command: @echo516# CHECK: # .---command stderr{{-*}}517# CHECK: # | stdin and stderr redirects not supported for @echo518# CHECK: error: command failed with exit status:519 520# CHECK: FAIL: shtest-shell :: echo-redirect-stderr.txt521# CHECK: *** TEST 'shtest-shell :: echo-redirect-stderr.txt' FAILED ***522# CHECK: echo 2> {{.*}}523# CHECK: # executed command: echo524# CHECK: # .---command stderr{{-*}}525# CHECK: # | stdin and stderr redirects not supported for echo526# CHECK: error: command failed with exit status:527 528# CHECK: FAIL: shtest-shell :: echo-redirect-stdin.txt529# CHECK: *** TEST 'shtest-shell :: echo-redirect-stdin.txt' FAILED ***530# CHECK: echo < {{.*}}531# CHECK: # executed command: echo532# CHECK: # .---command stderr{{-*}}533# CHECK: # | stdin and stderr redirects not supported for echo534# CHECK: error: command failed with exit status:535 536# CHECK: FAIL: shtest-shell :: error-0.txt537# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***538# CHECK: not-a-real-command539# CHECK: # .---command stderr{{-*}}540# CHECK: # | 'not-a-real-command': command not found541# CHECK: # error: command failed with exit status: 127542# CHECK: ***543 544# FIXME: The output here sucks.545#546# CHECK: UNRESOLVED: shtest-shell :: error-1.txt547# CHECK-NEXT: *** TEST 'shtest-shell :: error-1.txt' FAILED ***548# CHECK-NEXT: Exit Code: 1549# CHECK-EMPTY:550# CHECK-NEXT: Command Output (stdout):551# CHECK-NEXT: --552# CHECK-NEXT: # shell parser error on RUN: at line 3: echo "missing quote553# CHECK-EMPTY:554# CHECK-NEXT: --555# CHECK-EMPTY:556# CHECK-NEXT: ***557 558# CHECK: FAIL: shtest-shell :: error-2.txt559# CHECK: *** TEST 'shtest-shell :: error-2.txt' FAILED ***560# CHECK: Unsupported redirect:561# CHECK: ***562 563# CHECK: FAIL: shtest-shell :: mkdir-error-0.txt564# CHECK: *** TEST 'shtest-shell :: mkdir-error-0.txt' FAILED ***565# CHECK: mkdir -p temp | rm -rf temp566# CHECK: # .---command stderr{{-*}}567# CHECK: # | Unsupported: 'mkdir' cannot be part of a pipeline568# CHECK: # error: command failed with exit status: 127569# CHECK: ***570 571# CHECK: FAIL: shtest-shell :: mkdir-error-1.txt572# CHECK: *** TEST 'shtest-shell :: mkdir-error-1.txt' FAILED ***573# CHECK: mkdir -p -m 777 temp574# CHECK: # .---command stderr{{-*}}575# CHECK: # | Unsupported: 'mkdir': option -m not recognized576# CHECK: # error: command failed with exit status: 127577# CHECK: ***578 579# CHECK: FAIL: shtest-shell :: mkdir-error-2.txt580# CHECK: *** TEST 'shtest-shell :: mkdir-error-2.txt' FAILED ***581# CHECK: mkdir -p582# CHECK: # .---command stderr{{-*}}583# CHECK: # | Error: 'mkdir' is missing an operand584# CHECK: # error: command failed with exit status: 127585# CHECK: ***586 587# CHECK: FAIL: shtest-shell :: pipefail.txt588# CHECK: *** TEST 'shtest-shell :: pipefail.txt' FAILED ***589# CHECK: error: command failed with exit status: 1590# CHECK: ***591 592# CHECK: PASS: shtest-shell :: redirects.txt593 594# CHECK: FAIL: shtest-shell :: rm-error-0.txt595# CHECK: *** TEST 'shtest-shell :: rm-error-0.txt' FAILED ***596# CHECK: rm -rf temp | echo "hello"597# CHECK: # .---command stderr{{-*}}598# CHECK: # | Unsupported: 'rm' cannot be part of a pipeline599# CHECK: # error: command failed with exit status: 127600# CHECK: ***601 602# CHECK: FAIL: shtest-shell :: rm-error-1.txt603# CHECK: *** TEST 'shtest-shell :: rm-error-1.txt' FAILED ***604# CHECK: rm -f -v temp605# CHECK: # .---command stderr{{-*}}606# CHECK: # | Unsupported: 'rm': option -v not recognized607# CHECK: # error: command failed with exit status: 127608# CHECK: ***609 610# CHECK: FAIL: shtest-shell :: rm-error-2.txt611# CHECK: *** TEST 'shtest-shell :: rm-error-2.txt' FAILED ***612# CHECK: rm -r hello613# CHECK: # .---command stderr{{-*}}614# CHECK: # | Error: 'rm' command failed615# CHECK: # error: command failed with exit status: 1616# CHECK: ***617 618# CHECK: FAIL: shtest-shell :: rm-error-3.txt619# CHECK: *** TEST 'shtest-shell :: rm-error-3.txt' FAILED ***620# CHECK: Exit Code: 1621# CHECK: ***622 623# CHECK: PASS: shtest-shell :: rm-unicode-0.txt624# CHECK: PASS: shtest-shell :: sequencing-0.txt625# CHECK: XFAIL: shtest-shell :: sequencing-1.txt626 627# CHECK: FAIL: shtest-shell :: stdout-encoding.txt628# CHECK: *** TEST 'shtest-shell :: stdout-encoding.txt' FAILED ***629# CHECK: cat diff-in.bin630# CHECK: # .---command stdout{{-*}}631# CHECK-NEXT: # | {{.f.o.o.$}}632# CHECK-NEXT: # | {{.b.a.r.}}633# CHECK-NEXT: # | {{.b.a.z.$}}634# CHECK-NEXT: # `---{{-*}}635# CHECK-NOT: error636# CHECK: false637# CHECK: ***638 639# CHECK: PASS: shtest-shell :: valid-shell.txt640# CHECK: Unresolved Tests (2)641# CHECK: Failed Tests (37)642