summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e24c76b)
raw | patch | inline | side by side (parent: e24c76b)
author | Eric Wong <normalperson@yhbt.net> | |
Sun, 26 Jul 2009 10:01:52 +0000 (03:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 26 Jul 2009 18:51:45 +0000 (11:51 -0700) |
"git svn gc" will not compress unhandled.log files if
Compress::Zlib is missing. However, leftover index files should
always be removed, so add a test for this behavior as well.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Compress::Zlib is missing. However, leftover index files should
always be removed, so add a test for this behavior as well.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t9143-git-svn-gc.sh | patch | blob | history |
diff --git a/t/t9143-git-svn-gc.sh b/t/t9143-git-svn-gc.sh
index aaa3af014c7a8a8eb105374212f76cca8bf22012..f2ba2d1da34c1f6bf1790acd321ab5aa8aaeeca7 100755 (executable)
--- a/t/t9143-git-svn-gc.sh
+++ b/t/t9143-git-svn-gc.sh
cp .git/svn/git-svn/unhandled.log tmp
'
+test_expect_success 'create leftover index' '> .git/svn/git-svn/index'
+
test_expect_success 'git svn gc runs' 'git svn gc'
-test_expect_success 'git svn gc produces a valid gzip file' '
- gunzip .git/svn/git-svn/unhandled.log.gz
- '
+test_expect_success 'git svn index removed' '! test -f .git/svn/git-svn/index'
+
+if perl -MCompress::Zlib -e 0 2>/dev/null
+then
+ test_expect_success 'git svn gc produces a valid gzip file' '
+ gunzip .git/svn/git-svn/unhandled.log.gz
+ '
+else
+ say "Perl Compress::Zlib unavailable, skipping gunzip test"
+fi
test_expect_success 'git svn gc does not change unhandled.log files' '
test_cmp .git/svn/git-svn/unhandled.log tmp/unhandled.log