Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-03-21 08:09:39 +0300
committerJunio C Hamano <gitster@pobox.com>2011-03-21 08:09:39 +0300
commita8e04ddf6e3fc444469e6f0f2f4690c04c0290ab (patch)
tree6a00db96c1ac88e318bb379413743a95fe88076f /t
parentc3786c8472093ec01b73a71a56f405932044a67e (diff)
parent6cf6bb3e47ac2f667fa0b27a4222e903ff6fb77c (diff)
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