summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests/Inputs
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/Inputs
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/Inputs')
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-shell/diff-b.txt8
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-shell/diff-w.txt10
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-b.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-b.txt
new file mode 100644
index 00000000000..4c5f92b2d70
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-b.txt
@@ -0,0 +1,8 @@
+# RUN: echo 'f o o' > %t.0
+# RUN: echo 'b a r' >> %t.0
+
+# RUN: echo 'f o o' > %t.1
+# RUN: echo 'bar' >> %t.1
+
+# Due to -b, only second line has a change.
+# RUN: diff -b %t.0 %t.1
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-w.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-w.txt
new file mode 100644
index 00000000000..e5b0777c418
--- /dev/null
+++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-w.txt
@@ -0,0 +1,10 @@
+# RUN: echo 'f o o' > %t.0
+# RUN: echo 'b a r' >> %t.0
+# RUN: echo 'b a z' >> %t.0
+
+# RUN: echo 'f o o' > %t.1
+# RUN: echo 'bar' >> %t.1
+# RUN: echo 'b a t' >> %t.1
+
+# Due to -w, only third line has a change.
+# RUN: diff -w %t.0 %t.1
OpenPOWER on IntegriCloud