From 74f16b0c6fece88f585f9556fa1d3a7406e7a42e Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sat, 14 Jun 2008 03:26:37 -0400 Subject: mask necessary whitespace policy violations in test scripts All of these violations are necessary parts of the tests (which are generally checking the behavior of trailing whitespace, or contain diff fragments with empty lines). Our solution is two-fold: 1. Process input with whitespace problems using tr. This has the added bonus that it becomes very obvious where the bogus whitespace is intended to go. 2. Move large diff fragments into their own supplemental files. This gets rid of the whitespace problem, since supplemental files are not checked, and it also makes the test script a bit easier to read. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/t4119-apply-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t4119-apply-config.sh') diff --git a/t/t4119-apply-config.sh b/t/t4119-apply-config.sh index b540f7295a..3c73a783a7 100755 --- a/t/t4119-apply-config.sh +++ b/t/t4119-apply-config.sh @@ -19,12 +19,12 @@ test_expect_success setup ' ' # Also handcraft GNU diff output; note this has trailing whitespace. -cat >gpatch.file <<\EOF && +tr '_' ' ' >gpatch.file <<\EOF && --- file1 2007-02-21 01:04:24.000000000 -0800 +++ file1+ 2007-02-21 01:07:44.000000000 -0800 @@ -1 +1 @@ -A -+B ++B_ EOF sed -e 's|file1|sub/&|' gpatch.file >gpatch-sub.file && -- cgit v1.2.1