Merge branch 'aw/maint-shortlog-blank-lines'
[gitweb.git] / t / t7300-clean.sh
index f013c176ed910d278cbb886004429869f288ebc7..4037142927ab1b255da90d8f08207841b4e4c993 100755 (executable)
@@ -126,6 +126,20 @@ test_expect_success 'git-clean symbolic link' '
 
 '
 
+test_expect_success 'git-clean with wildcard' '
+
+       touch a.clean b.clean other.c &&
+       git-clean "*.clean" &&
+       test -f Makefile &&
+       test -f README &&
+       test -f src/part1.c &&
+       test -f src/part2.c &&
+       test ! -f a.clean &&
+       test ! -f b.clean &&
+       test -f other.c
+
+'
+
 test_expect_success 'git-clean -n' '
 
        mkdir -p build docs &&
@@ -302,4 +316,15 @@ test_expect_success 'core.excludesfile' '
 
 '
 
+test_expect_success 'removal failure' '
+
+       mkdir foo &&
+       touch foo/bar &&
+       exec <foo/bar &&
+       chmod 0 foo &&
+       test_must_fail git clean -f -d
+
+'
+chmod 755 foo
+
 test_done