summaryrefslogtreecommitdiff
path: root/t/t4119-apply-config.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2008-06-14 03:26:37 -0400
committerJunio C Hamano <gitster@pobox.com>2008-06-14 11:39:16 -0700
commit74f16b0c6fece88f585f9556fa1d3a7406e7a42e (patch)
tree69eeae4a23e0842bd7a9cc936a76554e257be4bd /t/t4119-apply-config.sh
parent3b2eb186bb738a374d9325b18710b19ec270e55f (diff)
downloadgit-74f16b0c6fece88f585f9556fa1d3a7406e7a42e.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4119-apply-config.sh')
-rwxr-xr-xt/t4119-apply-config.sh4
1 files changed, 2 insertions, 2 deletions
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 &&