[llvm] [llvm-lit][test] Precommit tests for lit's built-in cat command (PR #101530)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 6 23:49:43 PDT 2024
================
@@ -169,3 +169,23 @@
# NPLONG-CAT-OUTPUT-NEXT: M-HM-IM-JM-KM-LM-MM-NM-OM-PM-QM-RM-SM-TM-UM-VM-WM-XM-YM-ZM-[
# NPLONG-CAT-OUTPUT-NEXT: M-\M-]M-^M-_M-`M-aM-bM-cM-dM-eM-fM-gM-hM-iM-jM-kM-lM-mM-nM-o
# NPLONG-CAT-OUTPUT-NEXT: M-pM-qM-rM-sM-tM-uM-vM-wM-xM-yM-zM-{M-|M-}M-~M-^?
+#
+## Check cat command with -e option.
+## -e will convert text to ^ and M- notation and append a '$' to each new line.
+#
+# RUN: cat -e %S/cat_nonprinting.bin \
+# RUN: | FileCheck --check-prefix=NPE-CAT-OUTPUT --implicit-check-not={{.}} --match-full-lines --strict-whitespace %s
+# NPE-CAT-OUTPUT:^@^A^B^C^D^E^F^G ^H$
----------------
jh7370 wrote:
Nit, for readability, I might add some spacing as in the suggestion, so that the colons line up.
```suggestion
# NPE-CAT-OUTPUT:^@^A^B^C^D^E^F^G ^H$
```
https://github.com/llvm/llvm-project/pull/101530
More information about the llvm-commits
mailing list