46 lines · python
1# Check the various features of the ShTest format.2#3# RUN: not %{lit} -v %{inputs}/shtest-output-printing > %t.out4# RUN: FileCheck --input-file %t.out --match-full-lines %s5#6# END.7 8# CHECK: -- Testing: {{.*}}9# CHECK: FAIL: shtest-output-printing :: basic.txt {{.*}}10# CHECK-NEXT: ***{{\**}} TEST 'shtest-output-printing :: basic.txt' FAILED ***{{\**}}11# CHECK-NEXT: Exit Code: 112# CHECK-EMPTY:13# CHECK-NEXT: Command Output (stdout):14# CHECK-NEXT: --15# CHECK-NEXT: # RUN: at line 116# CHECK-NEXT: true17# CHECK-NEXT: # executed command: true18# CHECK-NEXT: # RUN: at line 219# CHECK-NEXT: echo hi20# CHECK-NEXT: # executed command: echo hi21# CHECK-NEXT: # .---command stdout------------22# CHECK-NEXT: # | hi23# CHECK-NEXT: # `-----------------------------24# CHECK-NEXT: # RUN: at line 325# CHECK-NEXT: not not wc missing-file &> [[FILE:.*]] || true26# CHECK-NEXT: # executed command: not not wc missing-file27# CHECK-NEXT: # .---redirected output from '[[FILE]]'28# CHECK-NEXT: # | {{.*}}wc: {{cannot open missing-file|missing-file.* No such file or directory}}29# CHECK-NEXT: # `-----------------------------30# CHECK-NEXT: # note: command had no output on stdout or stderr31# CHECK-NEXT: # error: command failed with exit status: 132# CHECK-NEXT: # executed command: true33# CHECK-NEXT: # RUN: at line 434# CHECK-NEXT: not {{.*}}python{{.*}} {{.*}}write-a-lot.py &> [[FILE:.*]]35# CHECK-NEXT: # executed command: not {{.*}}python{{.*}} {{.*}}write-a-lot.py{{.*}}36# CHECK-NEXT: # .---redirected output from '[[FILE]]'37# CHECK-NEXT: # | All work and no play makes Jack a dull boy.38# CHECK-NEXT: # | All work and no play makes Jack a dull boy.39# CHECK-NEXT: # | All work and no play makes Jack a dull boy.40# CHECK: # | ...41# CHECK-NEXT: # `---data was truncated--------42# CHECK-NEXT: # note: command had no output on stdout or stderr43# CHECK-NEXT: # error: command failed with exit status: 144# CHECK-EMPTY:45# CHECK-NEXT:--46