f54f48fc07
Mark some tests that match "*apply*" as passing when git is compiled with SANITIZE=leak. They'll now be listed as running under the "GIT_TEST_PASSING_SANITIZE_LEAK=true" test mode (the "linux-leaks" CI target). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
29 lines
564 B
Bash
Executable File
29 lines
564 B
Bash
Executable File
#!/bin/sh
|
|
|
|
test_description='git apply --numstat - <patch'
|
|
|
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success setup '
|
|
echo hello >text &&
|
|
git add text &&
|
|
echo goodbye >text &&
|
|
git diff >patch
|
|
'
|
|
|
|
test_expect_success 'git apply --numstat - < patch' '
|
|
echo "1 1 text" >expect &&
|
|
git apply --numstat - <patch >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_expect_success 'git apply --numstat - < patch patch' '
|
|
for i in 1 2; do echo "1 1 text"; done >expect &&
|
|
git apply --numstat - < patch patch >actual &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_done
|