[llvm] [llvm-lit][test] Adding tests for lit's built-in cat command (PR #101530)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 11:19:37 PDT 2024
================
@@ -0,0 +1,32 @@
+# Check the cat command
+
+# RUN: not %{lit} -a -v %{inputs}/shtest-cat \
+# RUN: | FileCheck -match-full-lines %s
+#
+# END.
+
+# CHECK: FAIL: shtest-cat :: cat-e-allchars.txt ({{[^)]*}})
+# CHECK: cat -e {{.+}}/allchars | FileCheck {{.*}}
+# CHECK: # executed command: cat -e {{.*}}
+# CHECK: # | Unsupported: 'cat': option -e not recognized
+# CHECK: # error: command failed with exit status: {{.*}}
+# CHECK: # executed command: FileCheck {{.*}}
+# CHECK: # error: command failed with exit status: {{.*}}
+
+# CHECK: FAIL: shtest-cat :: cat-e-newline.txt ({{[^)]*}})
+# CHECK: cat -e {{.+}}/newline | FileCheck {{.*}}
+# CHECK: # executed command: cat -e {{.*}}
+# CHECK: # | Unsupported: 'cat': option -e not recognized
+# CHECK: # error: command failed with exit status: {{.*}}
+# CHECK: # executed command: FileCheck {{.*}}
+# CHECK: # error: command failed with exit status: {{.*}}
+
+# CHECK: PASS: shtest-cat :: cat-newline.txt ({{[^)]*}})
+# CHECK: cat {{.+}}/newline | FileCheck {{.*}}
+# CHECK: # executed command: cat {{.*}}
+# CHECK: # executed command: FileCheck {{.*}}
----------------
ilovepi wrote:
Perhaps also for `cat -v`?
https://github.com/llvm/llvm-project/pull/101530
More information about the llvm-commits
mailing list