Commits

Anonymous committed df73af5

t9143: do not fail if Compress::Zlib is missing

"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>

Comments (0)

Files changed (1)

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.