xref: /llvm-project/llvm/utils/lit/tests/shtest-cat.py (revision 4bac8fd8904904bc7d502f39851eef50b5afff73)
1## Test the cat command.
2#
3# RUN: not %{lit} -a -v %{inputs}/shtest-cat \
4# RUN: | FileCheck -match-full-lines %s
5# END.
6
7# CHECK: FAIL: shtest-cat :: cat-error-0.txt ({{[^)]*}})
8# CHECK: cat -b temp1.txt
9# CHECK: # .---command stderr{{-*}}
10# CHECK-NEXT: # | Unsupported: 'cat':  option -b not recognized
11# CHECK: # error: command failed with exit status: 1
12
13# CHECK: FAIL: shtest-cat :: cat-error-1.txt ({{[^)]*}})
14# CHECK: cat temp1.txt
15# CHECK: # .---command stderr{{-*}}
16# CHECK-NEXT: # | [Errno 2] No such file or directory: 'temp1.txt'
17# CHECK: # error: command failed with exit status: 1
18
19# CHECK: PASS: shtest-cat :: cat.txt ({{[^)]*}})
20
21# CHECK: Total Discovered Tests: 3
22# CHECK-NEXT: Passed: 1 {{\([0-9]*\.[0-9]*%\)}}
23# CHECK-NEXT: Failed: 2 {{\([0-9]*\.[0-9]*%\)}}
24