diff options
Diffstat (limited to 't/t1007-hash-object.sh')
| -rwxr-xr-x | t/t1007-hash-object.sh | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index d73a5cc237..64658b3ba5 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -2,7 +2,6 @@ test_description="git hash-object" -TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh echo_without_newline() { @@ -31,7 +30,7 @@ setup_repo() { test_repo=test push_repo() { - test_create_repo $test_repo + git init --quiet $test_repo cd $test_repo setup_repo @@ -206,7 +205,7 @@ test_expect_success 'too-short tree' ' grep "too-short tree object" err ' -test_expect_success 'malformed mode in tree' ' +test_expect_success PERL_TEST_HELPERS 'malformed mode in tree' ' hex_oid=$(echo foo | git hash-object --stdin -w) && bin_oid=$(echo $hex_oid | hex2oct) && printf "9100644 \0$bin_oid" >tree-with-malformed-mode && @@ -214,7 +213,7 @@ test_expect_success 'malformed mode in tree' ' grep "malformed mode in tree entry" err ' -test_expect_success 'empty filename in tree' ' +test_expect_success PERL_TEST_HELPERS 'empty filename in tree' ' hex_oid=$(echo foo | git hash-object --stdin -w) && bin_oid=$(echo $hex_oid | hex2oct) && printf "100644 \0$bin_oid" >tree-with-empty-filename && @@ -222,7 +221,7 @@ test_expect_success 'empty filename in tree' ' grep "empty filename in tree entry" err ' -test_expect_success 'duplicate filename in tree' ' +test_expect_success PERL_TEST_HELPERS 'duplicate filename in tree' ' hex_oid=$(echo foo | git hash-object --stdin -w) && bin_oid=$(echo $hex_oid | hex2oct) && { @@ -249,15 +248,8 @@ test_expect_success 'hash-object complains about truncated type name' ' test_must_fail git hash-object -t bl --stdin </dev/null ' -test_expect_success '--literally' ' - t=1234567890 && - echo example | git hash-object -t $t --literally --stdin -' - -test_expect_success '--literally with extra-long type' ' - t=12345678901234567890123456789012345678901234567890 && - t="$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t$t" && - echo example | git hash-object -t $t --literally --stdin +test_expect_success '--literally complains about non-standard types' ' + test_must_fail git hash-object -t bogus --literally --stdin ' test_expect_success '--stdin outside of repository (uses SHA-1)' ' |
