git/t/t4106-apply-stdin.sh
Ævar Arnfjörð Bjarmason f54f48fc07 leak tests: mark some apply tests as passing with SANITIZE=leak
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>
2021-11-01 11:23:08 -07:00

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