зеркало из https://github.com/microsoft/git.git
ls-tree tests: add tests for --name-status
The --name-status synonym for --name-only added in
c639a5548a
(ls-tree: --name-only, 2005-12-01) had no tests, let's
make sure it works the same way as its sibling.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
cd3e606211
Коммит
a53343e0fd
|
@ -201,9 +201,11 @@ EOF
|
|||
test_cmp expected check
|
||||
'
|
||||
|
||||
test_expect_success 'ls-tree --name-only' '
|
||||
git ls-tree --name-only $tree >current &&
|
||||
cat >expected <<\EOF &&
|
||||
for opt in --name-only --name-status
|
||||
do
|
||||
test_expect_success "ls-tree $opt" '
|
||||
git ls-tree $opt $tree >current &&
|
||||
cat >expected <<-\EOF &&
|
||||
1.txt
|
||||
2.txt
|
||||
path0
|
||||
|
@ -214,9 +216,9 @@ EOF
|
|||
test_output
|
||||
'
|
||||
|
||||
test_expect_success 'ls-tree --name-only -r' '
|
||||
git ls-tree --name-only -r $tree >current &&
|
||||
cat >expected <<\EOF &&
|
||||
test_expect_success "ls-tree $opt -r" '
|
||||
git ls-tree $opt -r $tree >current &&
|
||||
cat >expected <<-\EOF &&
|
||||
1.txt
|
||||
2.txt
|
||||
path0/a/b/c/1.txt
|
||||
|
@ -227,5 +229,6 @@ path3/2.txt
|
|||
EOF
|
||||
test_output
|
||||
'
|
||||
done
|
||||
|
||||
test_done
|
||||
|
|
Загрузка…
Ссылка в новой задаче