diff options
author | Joel E. Denny <jdenny.ornl@gmail.com> | 2019-10-12 11:58:03 +0000 |
---|---|---|
committer | Joel E. Denny <jdenny.ornl@gmail.com> | 2019-10-12 11:58:03 +0000 |
commit | 92a8294f9eda2d9b3f7718cba68269a4fc8eea10 (patch) | |
tree | 55c99e18c0892872396471df9c2f1b798cf1a9b8 /llvm/utils/lit/tests/Inputs | |
parent | 32096a86b240a8f4be64094f58162137a17f72d7 (diff) | |
download | bcm5719-llvm-92a8294f9eda2d9b3f7718cba68269a4fc8eea10.tar.gz bcm5719-llvm-92a8294f9eda2d9b3f7718cba68269a4fc8eea10.zip |
Reland r374392: [lit] Extend internal diff to support -U
To avoid breaking some tests, D66574, D68664, D67643, and D68668
landed together. However, D68664 introduced an issue now addressed by
D68839, with which these are now all relanding.
Differential Revision: https://reviews.llvm.org/D68668
llvm-svn: 374651
Diffstat (limited to 'llvm/utils/lit/tests/Inputs')
-rw-r--r-- | llvm/utils/lit/tests/Inputs/shtest-shell/diff-unified.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-unified.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-unified.txt new file mode 100644 index 00000000000..e977c193247 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-unified.txt @@ -0,0 +1,38 @@ +# RUN: echo 1 > %t.foo +# RUN: echo 2 >> %t.foo +# RUN: echo 3 >> %t.foo +# RUN: echo 4 >> %t.foo +# RUN: echo 5 >> %t.foo +# RUN: echo 6 foo >> %t.foo +# RUN: echo 7 >> %t.foo +# RUN: echo 8 >> %t.foo +# RUN: echo 9 >> %t.foo +# RUN: echo 10 >> %t.foo +# RUN: echo 11 >> %t.foo + +# RUN: echo 1 > %t.bar +# RUN: echo 2 >> %t.bar +# RUN: echo 3 >> %t.bar +# RUN: echo 4 >> %t.bar +# RUN: echo 5 >> %t.bar +# RUN: echo 6 bar >> %t.bar +# RUN: echo 7 >> %t.bar +# RUN: echo 8 >> %t.bar +# RUN: echo 9 >> %t.bar +# RUN: echo 10 >> %t.bar +# RUN: echo 11 >> %t.bar + +# Default is 3 lines of context. +# RUN: diff -u %t.foo %t.bar && false || true + +# Override default of 3 lines of context. +# RUN: diff -U 2 %t.foo %t.bar && false || true +# RUN: diff -U4 %t.foo %t.bar && false || true +# RUN: diff -U0 %t.foo %t.bar && false || true + +# Check bad -U argument. +# RUN: diff -U 30.1 %t.foo %t.foo && false || true +# RUN: diff -U-1 %t.foo %t.foo && false || true + +# Fail so lit will print output. +# RUN: false |