Mercurial > hg > mercurial-crew-with-dirclash
diff tests/test-diff-ignore-whitespace @ 4879:da8640113b5a
Merge with -stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 14 Jul 2007 13:34:40 -0500 |
parents | 372d93f03d3a |
children |
line wrap: on
line diff
--- a/tests/test-diff-ignore-whitespace +++ b/tests/test-diff-ignore-whitespace @@ -3,6 +3,7 @@ # GNU diff is the reference for all of these results. hgdiff() { + echo hg diff $@ hg diff --nodates "$@" } @@ -72,6 +73,39 @@ test_added_blank_line_with_horizontal_wh hgdiff -Bb } +test_added_blank_line_with_other_whitespace() { + printf 'hello world\n \t\ngoodbye world \n' >foo + + echo '>>> three diffs showing added blank line w/other space <<<' + hgdiff + hgdiff -B + hgdiff -b + hgdiff -Bb +} + +test_whitespace_changes() { + printf 'helloworld\ngoodbye\tworld \n' >foo + + echo '>>> four diffs showing changed whitespace <<<' + hgdiff + hgdiff -B + hgdiff -b + hgdiff -Bb + hgdiff -w +} + +test_whitespace_changes_and_blank_lines() { + printf 'helloworld\n\n\n\ngoodbye\tworld \n' >foo + + echo '>>> five diffs showing changed whitespace <<<' + hgdiff + hgdiff -B + hgdiff -b + hgdiff -Bb + hgdiff -w + hgdiff -wB +} + hg init printf 'hello world\ngoodbye world\n' >foo hg ci -Amfoo -ufoo -d '0 0' @@ -82,3 +116,6 @@ test_added_horizontal_space_last_on_a_li test_added_horizontal_space_in_the_middle_of_a_word test_increased_horizontal_whitespace_amount test_added_blank_line_with_horizontal_whitespace +test_added_blank_line_with_other_whitespace +test_whitespace_changes +test_whitespace_changes_and_blank_lines