git/t/t1003-read-tree-prefix.sh
Ævar Arnfjörð Bjarmason 98300c8157 leak tests: mark some read-tree tests as passing with SANITIZE=leak
Mark some tests that match "*read-tree*" 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). We still have around half the tests that match
"*read-tree*" failing, but let's whitelist those that don't.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-10-12 18:23:24 -07:00

28 lines
444 B
Bash
Executable file

#!/bin/sh
#
# Copyright (c) 2006 Junio C Hamano
#
test_description='git read-tree --prefix test.
'
TEST_PASSES_SANITIZE_LEAK=true
. ./test-lib.sh
test_expect_success setup '
echo hello >one &&
git update-index --add one &&
tree=$(git write-tree) &&
echo tree is $tree
'
echo 'one
two/one' >expect
test_expect_success 'read-tree --prefix' '
git read-tree --prefix=two/ $tree &&
git ls-files >actual &&
cmp expect actual
'
test_done