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/shtest-shell.py | |
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/shtest-shell.py')
-rw-r--r-- | llvm/utils/lit/tests/shtest-shell.py | 78 |
1 files changed, 77 insertions, 1 deletions
diff --git a/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py index db57c3af1f1..c7e05d6bc42 100644 --- a/llvm/utils/lit/tests/shtest-shell.py +++ b/llvm/utils/lit/tests/shtest-shell.py @@ -331,6 +331,82 @@ # CHECK: PASS: shtest-shell :: diff-r.txt + +# CHECK: FAIL: shtest-shell :: diff-unified.txt + +# CHECK: *** TEST 'shtest-shell :: diff-unified.txt' FAILED *** + +# CHECK: $ "diff" "-u" "{{[^"]*}}.foo" "{{[^"]*}}.bar" +# CHECK: # command output: +# CHECK: @@ {{.*}} @@ +# CHECK-NEXT: 3 +# CHECK-NEXT: 4 +# CHECK-NEXT: 5 +# CHECK-NEXT: -6 foo +# CHECK-NEXT: +6 bar +# CHECK-NEXT: 7 +# CHECK-NEXT: 8 +# CHECK-NEXT: 9 +# CHECK-EMPTY: +# CHECK-NEXT: error: command failed with exit status: 1 +# CHECK-NEXT: $ "true" + +# CHECK: $ "diff" "-U" "2" "{{[^"]*}}.foo" "{{[^"]*}}.bar" +# CHECK: # command output: +# CHECK: @@ {{.*}} @@ +# CHECK-NEXT: 4 +# CHECK-NEXT: 5 +# CHECK-NEXT: -6 foo +# CHECK-NEXT: +6 bar +# CHECK-NEXT: 7 +# CHECK-NEXT: 8 +# CHECK-EMPTY: +# CHECK-NEXT: error: command failed with exit status: 1 +# CHECK-NEXT: $ "true" + +# CHECK: $ "diff" "-U4" "{{[^"]*}}.foo" "{{[^"]*}}.bar" +# CHECK: # command output: +# CHECK: @@ {{.*}} @@ +# CHECK-NEXT: 2 +# CHECK-NEXT: 3 +# CHECK-NEXT: 4 +# CHECK-NEXT: 5 +# CHECK-NEXT: -6 foo +# CHECK-NEXT: +6 bar +# CHECK-NEXT: 7 +# CHECK-NEXT: 8 +# CHECK-NEXT: 9 +# CHECK-NEXT: 10 +# CHECK-EMPTY: +# CHECK-NEXT: error: command failed with exit status: 1 +# CHECK-NEXT: $ "true" + +# CHECK: $ "diff" "-U0" "{{[^"]*}}.foo" "{{[^"]*}}.bar" +# CHECK: # command output: +# CHECK: @@ {{.*}} @@ +# CHECK-NEXT: -6 foo +# CHECK-NEXT: +6 bar +# CHECK-EMPTY: +# CHECK-NEXT: error: command failed with exit status: 1 +# CHECK-NEXT: $ "true" + +# CHECK: $ "diff" "-U" "30.1" "{{[^"]*}}" "{{[^"]*}}" +# CHECK: # command stderr: +# CHECK: Error: invalid '-U' argument: 30.1 +# CHECK: error: command failed with exit status: 1 +# CHECK: $ "true" + +# CHECK: $ "diff" "-U-1" "{{[^"]*}}" "{{[^"]*}}" +# CHECK: # command stderr: +# CHECK: Error: invalid '-U' argument: -1 +# CHECK: error: command failed with exit status: 1 +# CHECK: $ "true" + +# CHECK: $ "false" + +# CHECK: *** + + # CHECK: FAIL: shtest-shell :: error-0.txt # CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED *** # CHECK: $ "not-a-real-command" @@ -410,4 +486,4 @@ # CHECK: PASS: shtest-shell :: sequencing-0.txt # CHECK: XFAIL: shtest-shell :: sequencing-1.txt # CHECK: PASS: shtest-shell :: valid-shell.txt -# CHECK: Failing Tests (30) +# CHECK: Failing Tests (31) |