summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2012-08-24 18:03:58 (GMT)
committerSZEDER Gábor <szeder@ira.uka.de>2013-06-23 23:50:42 (GMT)
commit7412290cc4b5aa0efc205f81e4775dd7df9ea9d5 (patch)
treebb3ae8a8d2a910f0d8e939f46557e6bc1ce29587 /t
parent4fe00b4f0ab148de78db18790955d5e381377b14 (diff)
downloadgit-7412290cc4b5aa0efc205f81e4775dd7df9ea9d5.zip
git-7412290cc4b5aa0efc205f81e4775dd7df9ea9d5.tar.gz
git-7412290cc4b5aa0efc205f81e4775dd7df9ea9d5.tar.bz2
bash prompt: use 'write_script' helper in interactive rebase test
Helped-by: Jeff King <peff@peff.net> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Diffstat (limited to 't')
-rwxr-xr-xt/t9903-bash-prompt.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh
index 7c7f8b9..442b9a2 100755
--- a/t/t9903-bash-prompt.sh
+++ b/t/t9903-bash-prompt.sh
@@ -248,14 +248,12 @@ test_expect_success 'prompt - inside bare repository' '
test_expect_success 'prompt - interactive rebase' '
printf " (b1|REBASE-i 2/3)" >expected
- echo "#!$SHELL_PATH" >fake_editor.sh &&
- cat >>fake_editor.sh <<\EOF &&
-echo "exec echo" >"$1"
-echo "edit $(git log -1 --format="%h")" >>"$1"
-echo "exec echo" >>"$1"
-EOF
+ write_script fake_editor.sh <<-\EOF &&
+ echo "exec echo" >"$1"
+ echo "edit $(git log -1 --format="%h")" >>"$1"
+ echo "exec echo" >>"$1"
+ EOF
test_when_finished "rm -f fake_editor.sh" &&
- chmod a+x fake_editor.sh &&
test_set_editor "$TRASH_DIRECTORY/fake_editor.sh" &&
git checkout b1 &&
test_when_finished "git checkout master" &&