[llvm] [llvm-lit][test][NFC] Moved cat command tests into separate lit test file (PR #102366)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 9 00:20:40 PDT 2024


================
@@ -0,0 +1,20 @@
+## Check the cat command.
+#
+# RUN: not %{lit} -a -v %{inputs}/shtest-cat \
+# RUN: | FileCheck -match-full-lines %s
+#
+# END.
+
+# CHECK: FAIL: shtest-cat :: cat-error-0.txt ({{[^)]*}})
+# CHECK: cat -b temp1.txt
+# CHECK: # .---command stderr{{-*}}
+# CHECK: # | Unsupported: 'cat':  option -b not recognized
+# CHECK: # error: command failed with exit status: 1
+
+# CHECK: FAIL: shtest-cat :: cat-error-1.txt ({{[^)]*}})
+# CHECK: cat temp1.txt
+# CHECK: # .---command stderr{{-*}}
+# CHECK: # | [Errno 2] No such file or directory: 'temp1.txt'
+# CHECK: # error: command failed with exit status: 1
+
+# CHECK: PASS: shtest-cat :: cat.txt ({{[^)]*}})
----------------
jh7370 wrote:

Nit: add a new line at EOF while you're creating it.

https://github.com/llvm/llvm-project/pull/102366


More information about the llvm-commits mailing list