summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests/shtest-shell.py
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2019-12-17 10:23:11 -0500
committerJoel E. Denny <jdenny.ornl@gmail.com>2019-12-17 10:49:34 -0500
commit9658e77e27fa2a93667f840d230086d783fed6dc (patch)
tree317dc5a1d7e4a289df48635f87c76179d5257036 /llvm/utils/lit/tests/shtest-shell.py
parentfbaf835c5c515bf00dccd880b8afe0b2e0a10e06 (diff)
downloadbcm5719-llvm-9658e77e27fa2a93667f840d230086d783fed6dc.tar.gz
bcm5719-llvm-9658e77e27fa2a93667f840d230086d783fed6dc.zip
[lit] Fix internal diff newlines for -w/-b
For example, without this patch: ``` $ python $LIT_BUILTINS/diff.py -b foo.txt bar.txt *** /tmp/foo.txt --- /tmp/bar.txt *************** *** 1,2 **** 1! 2--- 1,2 ---- 1! 20 ``` With this patch: ``` $ python $LIT_BUILTINS/diff.py -b foo.txt bar.txt *** /tmp/foo.txt --- /tmp/bar.txt *************** *** 1,2 **** 1 ! 2 --- 1,2 ---- 1 ! 20 ``` Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71577
Diffstat (limited to 'llvm/utils/lit/tests/shtest-shell.py')
-rw-r--r--llvm/utils/lit/tests/shtest-shell.py34
1 files changed, 33 insertions, 1 deletions
diff --git a/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py
index 443cc10ef3b..5bf38ebd08f 100644
--- a/llvm/utils/lit/tests/shtest-shell.py
+++ b/llvm/utils/lit/tests/shtest-shell.py
@@ -34,6 +34,22 @@
# CHECK: error: command failed with exit status: 127
# CHECK: ***
+# CHECK: PASS: shtest-shell :: dev-null.txt
+
+# CHECK: FAIL: shtest-shell :: diff-b.txt
+# CHECK: *** TEST 'shtest-shell :: diff-b.txt' FAILED ***
+# CHECK: $ "diff" "-b" "{{[^"]*}}.0" "{{[^"]*}}.1"
+# CHECK: # command output:
+# CHECK: 1,2
+# CHECK-NEXT: {{^ }}f o o
+# CHECK-NEXT: ! b a r
+# CHECK-NEXT: ---
+# CHECK-NEXT: {{^ }}f o o
+# CHECK-NEXT: ! bar
+# CHECK-EMPTY:
+# CHECK: error: command failed with exit status: 1
+# CHECK: ***
+
# CHECK: FAIL: shtest-shell :: diff-encodings.txt
# CHECK: *** TEST 'shtest-shell :: diff-encodings.txt' FAILED ***
@@ -460,6 +476,22 @@
# CHECK: ***
+# CHECK: FAIL: shtest-shell :: diff-w.txt
+# CHECK: *** TEST 'shtest-shell :: diff-w.txt' FAILED ***
+# CHECK: $ "diff" "-w" "{{[^"]*}}.0" "{{[^"]*}}.1"
+# CHECK: # command output:
+# CHECK: 1,3
+# CHECK-NEXT: {{^ }}foo
+# CHECK-NEXT: {{^ }}bar
+# CHECK-NEXT: ! baz
+# CHECK-NEXT: ---
+# CHECK-NEXT: {{^ }}foo
+# CHECK-NEXT: {{^ }}bar
+# CHECK-NEXT: ! bat
+# CHECK-EMPTY:
+# CHECK: error: command failed with exit status: 1
+# CHECK: ***
+
# CHECK: FAIL: shtest-shell :: error-0.txt
# CHECK: *** TEST 'shtest-shell :: error-0.txt' FAILED ***
# CHECK: $ "not-a-real-command"
@@ -551,4 +583,4 @@
# CHECK: ***
# CHECK: PASS: shtest-shell :: valid-shell.txt
-# CHECK: Failing Tests (33)
+# CHECK: Failing Tests (35)
OpenPOWER on IntegriCloud