summaryrefslogtreecommitdiff
path: root/t/t9903-bash-prompt.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-20 18:33:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-20 18:33:55 (GMT)
commite72db08f151dfec0c177b91ae903a8fbe56cda7c (patch)
tree74e6c0e319a531c05639110427942dafd3006a5e /t/t9903-bash-prompt.sh
parent6bbd1034d869756ac2679879bd2fa085b1a8f137 (diff)
parent6ec633059ad0b17850ad18c7325678d6c845b74c (diff)
downloadgit-e72db08f151dfec0c177b91ae903a8fbe56cda7c.zip
git-e72db08f151dfec0c177b91ae903a8fbe56cda7c.tar.gz
git-e72db08f151dfec0c177b91ae903a8fbe56cda7c.tar.bz2
Merge branch 'wc/make-funnynames-shared-lazy-prereq'
A test prerequisite defined by various test scripts with slightly different semantics has been consolidated into a single copy and made into a lazily defined one. * wc/make-funnynames-shared-lazy-prereq: t: factor out FUNNYNAMES as shared lazy prereq
Diffstat (limited to 't/t9903-bash-prompt.sh')
-rwxr-xr-xt/t9903-bash-prompt.sh13
1 files changed, 5 insertions, 8 deletions
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 0444068..ab890d3 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -63,18 +63,15 @@ test_expect_success 'prompt - unborn branch' '
test_cmp expected "$actual"
'
-repo_with_newline='repo
-with
-newline'
-
-if test_have_prereq !MINGW && mkdir "$repo_with_newline" 2>/dev/null
-then
- test_set_prereq FUNNYNAMES
-else
+if test_have_prereq !FUNNYNAMES; then
say 'Your filesystem does not allow newlines in filenames.'
fi
test_expect_success FUNNYNAMES 'prompt - with newline in path' '
+ repo_with_newline="repo
+with
+newline" &&
+ mkdir "$repo_with_newline" &&
printf " (master)" >expected &&
git init "$repo_with_newline" &&
test_when_finished "rm -rf \"$repo_with_newline\"" &&