Add test for git clean -e.
Signed-off-by: Jared Hance <jaredhance@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jared Hance committed
Jul 20, 2010 at 15:36 UTC
2c76c3fecee688f88440db4167813cc25efd0388
1 file changed
+16
t/t7300-clean.sh
+16
@@ -438,4 +438,20 @@ test_expect_success 'force removal of nested git work tree' '
438
! test -d bar
439
'
440
441
+test_expect_success 'git clean -e' '
442
+ rm -fr repo &&
443
+ mkdir repo &&
444
+ (
445
+ cd repo &&
446
+ git init &&
447
+ touch 1 2 3 known &&
448
+ git add known &&
449
+ git clean -f -e 1 -e 2 &&
450
+ test -e 1 &&
451
+ test -e 2 &&
452
+ ! (test -e 3) &&
453
+ test -e known
454
+ )
455
+'
456
+
457
test_done