[Lldb-commits] [lldb] [llvm-lit][test] Change unsupported cat -e to cat -v to work with lit internal shell (PR #104878)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 20 01:54:16 PDT 2024
DavidSpickett wrote:
I think Jonas might be on vacation at the moment, I can do a reasonable impression in the meantime :)
For GNU cat, `-e` is equivalent to `-eV`. `e` prints the non-printable characters and `v` puts `$` on the end of the line.
```
-e equivalent to -vE
<...>
-E, --show-ends
display $ at end of each line
-v, --show-nonprinting
use ^ and M- notation, except for LFD and TAB
```
For Mac (https://www.unix.com/man-page/osx/1/cat/) and BSD (https://man.freebsd.org/cgi/man.cgi?cat(1)), `-e` is `-v` with the addition of adding `$` on the end. There's no separate `-E` option.
It has been `cat -e` since the test was added in https://github.com/llvm/llvm-project/commit/de019b88dd5804ec996fe8c12cddcc6feb13afa1 / https://reviews.llvm.org/D81058.
Using `-v` works fine because the test does not look for the `$` on the end of the line, just the (usually) non-printable colour characters.
So I don't think there is any problem with landing this, once you add the option explanation to the PR description.
https://github.com/llvm/llvm-project/pull/104878
More information about the lldb-commits
mailing list