Joel E. Denny 9658e77e27 [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
2019-12-17 10:49:34 -05:00

11 lines
236 B
Plaintext

# 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