git clean: Add test to verify directories aren't removed with a prefix

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Shawn Bohrer 2008-04-13 18:49:38 -05:00 committed by Junio C Hamano
parent f2d0df7148
commit 2b6f0b0a78
1 changed files with 3 additions and 2 deletions

View File

@ -75,8 +75,8 @@ test_expect_success 'git-clean src/ src/' '


test_expect_success 'git-clean with prefix' ' test_expect_success 'git-clean with prefix' '


mkdir -p build docs && mkdir -p build docs src/test &&
touch a.out src/part3.c docs/manual.txt obj.o build/lib.so && touch a.out src/part3.c docs/manual.txt obj.o build/lib.so src/test/1.c &&
(cd src/ && git-clean) && (cd src/ && git-clean) &&
test -f Makefile && test -f Makefile &&
test -f README && test -f README &&
@ -84,6 +84,7 @@ test_expect_success 'git-clean with prefix' '
test -f src/part2.c && test -f src/part2.c &&
test -f a.out && test -f a.out &&
test ! -f src/part3.c && test ! -f src/part3.c &&
test -f src/test/1.c &&
test -f docs/manual.txt && test -f docs/manual.txt &&
test -f obj.o && test -f obj.o &&
test -f build/lib.so test -f build/lib.so