From: Junio C Hamano Date: Mon, 9 Jul 2012 16:01:52 +0000 (-0700) Subject: Merge branch 'vr/use-our-perl-in-tests' X-Git-Tag: v1.7.12-rc0~54 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/967abba7169ad10eff841fe32b70f3e7a1126b63?ds=inline;hp=-c Merge branch 'vr/use-our-perl-in-tests' Some implementations of Perl terminates "lines" with CRLF even when the script is operating on just a sequence of bytes. Make sure to use "$PERL_PATH", the version of Perl the user told Git to use, in our tests to avoid unnecessary breakages in tests. * vr/use-our-perl-in-tests: t/README: add a bit more Don'ts tests: enclose $PERL_PATH in double quotes t/test-lib.sh: export PERL_PATH for use in scripts t: Replace 'perl' by $PERL_PATH --- 967abba7169ad10eff841fe32b70f3e7a1126b63 diff --combined t/t5300-pack-object.sh index 300ed910a5,4fd69a19eb..2e52f8b838 --- a/t/t5300-pack-object.sh +++ b/t/t5300-pack-object.sh @@@ -13,9 -13,9 +13,9 @@@ TRASH=`pwd test_expect_success \ 'setup' \ 'rm -f .git/index* && - perl -e "print \"a\" x 4096;" > a && - perl -e "print \"b\" x 4096;" > b && - perl -e "print \"c\" x 4096;" > c && + "$PERL_PATH" -e "print \"a\" x 4096;" > a && + "$PERL_PATH" -e "print \"b\" x 4096;" > b && + "$PERL_PATH" -e "print \"c\" x 4096;" > c && test-genrandom "seed a" 2097152 > a_big && test-genrandom "seed b" 2097152 > b_big && git update-index --add a a_big b b_big c && @@@ -129,7 -129,7 +129,7 @@@ test_expect_success cd "$TRASH" test_expect_success 'compare delta flavors' ' - perl -e '\'' + "$PERL_PATH" -e '\'' defined($_ = -s $_) or die for @ARGV; exit 1 if $ARGV[0] <= $ARGV[1]; '\'' test-2-$packname_2.pack test-3-$packname_3.pack @@@ -418,9 -418,4 +418,9 @@@ test_expect_success 'test_must_fail git index-pack -o bad.idx test-3.pack 2>msg && grep "SHA1 COLLISION FOUND" msg' +test_expect_success \ + 'make sure index-pack detects the SHA1 collision (large blobs)' \ + 'test_must_fail git -c core.bigfilethreshold=1 index-pack -o bad.idx test-3.pack 2>msg && + grep "SHA1 COLLISION FOUND" msg' + test_done diff --combined t/t9300-fast-import.sh index c17f52e586,11f977bec2..2fcf269469 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@@ -12,7 -12,7 +12,7 @@@ test_description='test git fast-import # This could be written as "head -c $1", but IRIX "head" does not # support the -c option. head_c () { - perl -e ' + "$PERL_PATH" -e ' my $len = $ARGV[1]; while ($len > 0) { my $s; @@@ -2117,7 -2117,7 +2117,7 @@@ test_expect_success grep :1 git.marks' test_expect_success \ - 'R: export-marks options can be overriden by commandline options' \ + 'R: export-marks options can be overridden by commandline options' \ 'cat input | git fast-import --export-marks=other.marks && grep :1 other.marks'