diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-03-23 21:09:31 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-23 21:09:31 (GMT) |
commit | 361c2566c0aef409a7e266f0a3192a8f62f157a8 (patch) | |
tree | 7b724d6e4a709ff2dc7f32c829853a491eec3db2 /t | |
parent | 1f390f2ad5aed63f87d0764e9748fddf9db4e59c (diff) | |
parent | 77e56d55ba6eee1c6efe08d4872e5001ed8e563a (diff) | |
download | git-361c2566c0aef409a7e266f0a3192a8f62f157a8.zip git-361c2566c0aef409a7e266f0a3192a8f62f157a8.tar.gz git-361c2566c0aef409a7e266f0a3192a8f62f157a8.tar.bz2 |
Merge branch 'ab/plug-random-leaks'
Double-free fix for a recently merged topic.
* ab/plug-random-leaks:
diff.c: fix a double-free regression in a18d66cefb
tests: demonstrate "show --word-diff --color-moved" regression
Diffstat (limited to 't')
-rwxr-xr-x | t/t4015-diff-whitespace.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh index 9babf13..f3e20dd 100755 --- a/t/t4015-diff-whitespace.sh +++ b/t/t4015-diff-whitespace.sh @@ -6,6 +6,8 @@ test_description='Test special whitespace in diff engine. ' + +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh . "$TEST_DIRECTORY"/lib-diff.sh @@ -1622,7 +1624,7 @@ test_expect_success 'cmd option assumes configured colored-moved' ' test_cmp expected actual ' -test_expect_success 'no effect from --color-moved with --word-diff' ' +test_expect_success 'no effect on diff from --color-moved with --word-diff' ' cat <<-\EOF >text.txt && Lorem Ipsum is simply dummy text of the printing and typesetting industry. EOF @@ -1636,6 +1638,12 @@ test_expect_success 'no effect from --color-moved with --word-diff' ' test_cmp expect actual ' +test_expect_success !SANITIZE_LEAK 'no effect on show from --color-moved with --word-diff' ' + git show --color-moved --word-diff >actual && + git show --word-diff >expect && + test_cmp expect actual +' + test_expect_success 'set up whitespace tests' ' git reset --hard && # Note that these lines have no leading or trailing whitespace. @@ -2016,7 +2024,7 @@ test_expect_success '--color-moved rewinds for MIN_ALNUM_COUNT' ' test_cmp expected actual ' -test_expect_success 'move detection with submodules' ' +test_expect_success !SANITIZE_LEAK 'move detection with submodules' ' test_create_repo bananas && echo ripe >bananas/recipe && git -C bananas add recipe && |