summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2011-03-20 22:09:39 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-03-20 22:09:39 -0700
commita8e04ddf6e3fc444469e6f0f2f4690c04c0290ab (patch)
tree6a00db96c1ac88e318bb379413743a95fe88076f /t
parentWork around broken ln on solaris as used in t8006 (diff)
parentImprove error messages when temporary file creation fails (diff)
downloadtgif-a8e04ddf6e3fc444469e6f0f2f4690c04c0290ab.tar.xz
Merge branch 'ae/better-template-failure-report' into maint
* ae/better-template-failure-report: Improve error messages when temporary file creation fails
Diffstat (limited to 't')
-rwxr-xr-xt/t0070-fundamental.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh
index 680d7d6861..9bee8bfd2e 100755
--- a/t/t0070-fundamental.sh
+++ b/t/t0070-fundamental.sh
@@ -12,4 +12,17 @@ test_expect_success 'character classes (isspace, isalpha etc.)' '
test-ctype
'
+test_expect_success 'mktemp to nonexistent directory prints filename' '
+ test_must_fail test-mktemp doesnotexist/testXXXXXX 2>err &&
+ grep "doesnotexist/test" err
+'
+
+test_expect_success POSIXPERM 'mktemp to unwritable directory prints filename' '
+ mkdir cannotwrite &&
+ chmod -w cannotwrite &&
+ test_when_finished "chmod +w cannotwrite" &&
+ test_must_fail test-mktemp cannotwrite/testXXXXXX 2>err &&
+ grep "cannotwrite/test" err
+'
+
test_done