diff options
author | Jeff King <peff@peff.net> | 2008-06-14 03:26:37 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-06-14 11:39:16 -0700 |
commit | 74f16b0c6fece88f585f9556fa1d3a7406e7a42e (patch) | |
tree | 69eeae4a23e0842bd7a9cc936a76554e257be4bd /t/t4015-diff-whitespace.sh | |
parent | 3b2eb186bb738a374d9325b18710b19ec270e55f (diff) | |
download | git-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/t4015-diff-whitespace.sh')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index ca0302f41b..b7cc6b28e6 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -62,16 +62,16 @@ EOF git update-index x -cat << EOF > x +tr '_' ' ' << EOF > x whitespace at beginning whitespace change white space in the middle -whitespace at end +whitespace at end__ unchanged line CR at end EOF -tr 'Q' '\015' << EOF > expect +tr 'Q_' '\015 ' << EOF > expect diff --git a/x b/x index d99af23..8b32fb5 100644 --- a/x @@ -84,7 +84,7 @@ index d99af23..8b32fb5 100644 + whitespace at beginning +whitespace change +white space in the middle -+whitespace at end ++whitespace at end__ unchanged line -CR at endQ +CR at end |