Skip to content

Commit

Permalink
git clean: Add test to verify directories aren't removed with a prefix
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Shawn Bohrer authored and Junio C Hamano committed Apr 15, 2008
1 parent f2d0df7 commit 2b6f0b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/t7300-clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ test_expect_success 'git-clean src/ src/' '

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

0 comments on commit 2b6f0b0

Please sign in to comment.