From 36b1b7d1f8921e948b58a1c3fb709c1234ff90c7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 11 Jul 2019 15:23:31 -0700 Subject: 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 --- tests/diff.test | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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" "" "" "" -- cgit v1.2.3