mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
![Ævar Arnfjörð Bjarmason](/assets/img/avatar_default.png)
Mark some tests that match "*ls-files*" 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 others that match '*ls-files*" that fail under SANITIZE=leak. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
43 lines
868 B
Bash
Executable file
43 lines
868 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='ls-files --exclude does not affect index files'
|
|
|
|
TEST_PASSES_SANITIZE_LEAK=true
|
|
. ./test-lib.sh
|
|
|
|
test_expect_success 'create repo with file' '
|
|
echo content >file &&
|
|
git add file &&
|
|
git commit -m file &&
|
|
echo modification >file
|
|
'
|
|
|
|
check_output() {
|
|
test_expect_success "ls-files output contains file ($1)" "
|
|
echo '$2' >expect &&
|
|
git ls-files --exclude-standard --$1 >output &&
|
|
test_cmp expect output
|
|
"
|
|
}
|
|
|
|
check_all_output() {
|
|
check_output 'cached' 'file'
|
|
check_output 'modified' 'file'
|
|
}
|
|
|
|
check_all_output
|
|
test_expect_success 'add file to gitignore' '
|
|
echo file >.gitignore
|
|
'
|
|
check_all_output
|
|
|
|
test_expect_success 'ls-files -i -c lists only tracked-but-ignored files' '
|
|
echo content >other-file &&
|
|
git add other-file &&
|
|
echo file >expect &&
|
|
git ls-files -i -c --exclude-standard >output &&
|
|
test_cmp expect output
|
|
'
|
|
|
|
test_done
|