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
This commit is contained in:
Junio C Hamano
2018-08-20 11:33:55 -07:00
5 changed files with 26 additions and 25 deletions

View File

@ -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\"" &&