[llvm] [llvm-lit][test] Updated built-in cat command tests (PR #104473)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 16 00:06:50 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
# FILE-EXISTS: True
-# CAT-OUTPUT: abcdefgh
+# CAT-OUTPUT:abcdefgh
#
----------------
jh7370 wrote:
I think this `#` here actually harms readability, as it makes it harder to spot the end of the first test case (a pure blank line would be easier to see). I'd also consider removing the whole line between the comment and first RUN command for each test case, but I'm not overly fussed by that one.
Same goes throughout.
https://github.com/llvm/llvm-project/pull/104473
More information about the llvm-commits
mailing list