summaryrefslogtreecommitdiff
path: root/t/t7005-editor.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-05-14 10:28:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-05-15 03:27:29 (GMT)
commit4362da078e0b507fbb322ac3b33476a863f32493 (patch)
treefb4592ac38dfebfbcec9d80163a6ce0b79ee7a81 /t/t7005-editor.sh
parentd32eb83c1db7d0a8bb54fe743c6d1dd674d372c5 (diff)
downloadgit-4362da078e0b507fbb322ac3b33476a863f32493.zip
git-4362da078e0b507fbb322ac3b33476a863f32493.tar.gz
git-4362da078e0b507fbb322ac3b33476a863f32493.tar.bz2
t7005-editor: get rid of the SPACES_IN_FILENAMES prereq
The last two tests 'editor with a space' and 'core.editor with a space' in 't7005-editor.sh' need the SPACES_IN_FILENAMES prereq to ensure that they are only run on filesystems that allow, well, spaces in filenames. However, we have been putting a space in the name of the trash directory for just over a decade now, so we wouldn't be able to run any of our tests on such a filesystem in the first place. This prereq is therefore unnecessary, remove it. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7005-editor.sh')
-rwxr-xr-xt/t7005-editor.sh12
1 files changed, 3 insertions, 9 deletions
diff --git a/t/t7005-editor.sh b/t/t7005-editor.sh
index 29e5043..b2ca77b 100755
--- a/t/t7005-editor.sh
+++ b/t/t7005-editor.sh
@@ -111,14 +111,8 @@ do
'
done
-if echo 'echo space > "$1"' > "e space.sh"
-then
- # FS supports spaces in filenames
- test_set_prereq SPACES_IN_FILENAMES
-fi
-
-test_expect_success SPACES_IN_FILENAMES 'editor with a space' '
-
+test_expect_success 'editor with a space' '
+ echo "echo space >\$1" >"e space.sh" &&
chmod a+x "e space.sh" &&
GIT_EDITOR="./e\ space.sh" git commit --amend &&
test space = "$(git show -s --pretty=format:%s)"
@@ -126,7 +120,7 @@ test_expect_success SPACES_IN_FILENAMES 'editor with a space' '
'
unset GIT_EDITOR
-test_expect_success SPACES_IN_FILENAMES 'core.editor with a space' '
+test_expect_success 'core.editor with a space' '
git config core.editor \"./e\ space.sh\" &&
git commit --amend &&