diff options
author | Elliott Hughes <enh@google.com> | 2019-07-11 15:23:31 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-07-12 13:19:10 -0500 |
commit | 36b1b7d1f8921e948b58a1c3fb709c1234ff90c7 (patch) | |
tree | 3b9a381f43a57a5fddaa627aa824de94f882f6b3 /tests | |
parent | a7b8b772dee4f159028e3b998454d7466fbbc88f (diff) | |
download | toybox-36b1b7d1f8921e948b58a1c3fb709c1234ff90c7.tar.gz |
diff: implement --strip-trailing-cr.
Used by some ART tests and also some LLVM tests. (The motivating example
is the latter, but I noticed the former when looking for other users.)
Bug: http://b/137298656
Diffstat (limited to 'tests')
-rw-r--r-- | tests/diff.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/diff.test b/tests/diff.test index 98477587..f78eaa66 100644 --- a/tests/diff.test +++ b/tests/diff.test @@ -33,3 +33,8 @@ echo foo > tree1/file echo food > tree2/file testing "-r" "diff -r -L tree1/file -L tree2/file tree1 tree2 |tee out" "$expected" "" "" + +echo -e "hello\r\nworld\r\n"> a +echo -e "hello\nworld\n"> b +testing "--strip-trailing-cr off" "diff -q a b" "Files a and b differ\n" "" "" +testing "--strip-trailing-cr on" "diff -u --strip-trailing-cr a b" "" "" "" |