[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
https://github.com/jh7370 commented:
Picking up on your earlier comment, I think showing the behaviour of `cat` with a file without a trailing new line is indeed an interesting behaviour to test. It will require a new test input.
Looking more generally at the existing test file, if I'm not mistaken, you should be able to remove the `NPLONG-CAT-OUTPUT` checks, since they're identical to `NP-CAT-OUTPUT`. I'd also consider splitting all these cat tests into a separate file (like you had before) for ease of identification in the future. You can keep all the cat tests in the same test file, but I'd suggest it not be mixed with the other test behaviour. I'd do all that in the same prerequisite PR that I mentioned, to avoid conflating new tests with existing tests. I'd even consider two prerequisite PRs: the first to move the tests, and the second to improve them as suggested. This would make reviewing the second of these easier. Up to you though.
https://github.com/llvm/llvm-project/pull/101530
More information about the llvm-commits
mailing list