File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,29 @@ test_expect_success 'prompt - unborn branch' '
61
61
test_cmp expected "$actual"
62
62
'
63
63
64
+ repo_with_newline=' repo
65
+ with
66
+ newline'
67
+
68
+ if mkdir " $repo_with_newline " 2> /dev/null
69
+ then
70
+ test_set_prereq FUNNYNAMES
71
+ else
72
+ say ' Your filesystem does not allow newlines in filenames.'
73
+ fi
74
+
75
+ test_expect_success FUNNYNAMES ' prompt - with newline in path' '
76
+ printf " (master)" >expected &&
77
+ git init "$repo_with_newline" &&
78
+ test_when_finished "rm -rf \"$repo_with_newline\"" &&
79
+ mkdir "$repo_with_newline"/subdir &&
80
+ (
81
+ cd "$repo_with_newline/subdir" &&
82
+ __git_ps1 >"$actual"
83
+ ) &&
84
+ test_cmp expected "$actual"
85
+ '
86
+
64
87
test_expect_success ' prompt - detached head' '
65
88
printf " ((%s...))" $(git log -1 --format="%h" --abbrev=13 b1^) >expected &&
66
89
test_config core.abbrev 13 &&
You can’t perform that action at this time.
0 commit comments