[llvm] [llvm-lit][test] Updated built-in cat command tests (PR #104473)

Paul Kirth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 10:42:30 PDT 2024


================
@@ -1,83 +1,77 @@
 ## Test cat command with a single file.
 #
-# RUN: rm -rf %T/testCat
-# RUN: mkdir -p %T/testCat
-# RUN: echo "abcdefgh" > %T/testCat/temp.write
-# RUN: cat %T/testCat/temp.write > %T/testCat/tempcat.write
-# RUN: %{python} %S/../check_path.py file %T/testCat/tempcat.write > %T/testCat/path.out
-# RUN: FileCheck --check-prefix=FILE-EXISTS < %T/testCat/path.out %s
-# RUN: FileCheck --check-prefix=CAT-OUTPUT < %T/testCat/tempcat.write %s
+# RUN: rm -rf %t
+# RUN: mkdir -p %t
+# RUN: echo "abcdefgh" > %t/temp.write
+# RUN: cat %t/temp.write > %t/tempcat.write
+# RUN: %{python} %S/../check_path.py file %t/tempcat.write > %t/path.out
+# RUN: FileCheck --check-prefix=FILE-EXISTS < %t/path.out %s
+# RUN: FileCheck --check-prefix=CAT-OUTPUT --implicit-check-not={{.}} \
+# RUN: --match-full-lines --strict-whitespace < %t/tempcat.write %s
----------------
ilovepi wrote:

```suggestion
# RUN: FileCheck --check-prefix=CAT-OUTPUT --implicit-check-not={{.}} \
# RUN:   --match-full-lines --strict-whitespace < %t/tempcat.write %s
```
This is a more typical way to format the RUN lines, so that its visually clear the command continues from the preceding one. Please update the other multi-line RUN commands in this patch as well.

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


More information about the llvm-commits mailing list