Skip to content

Commit 7412290

Browse files
committed
bash prompt: use 'write_script' helper in interactive rebase test
Helped-by: Jeff King <[email protected]> Signed-off-by: SZEDER Gábor <[email protected]>
1 parent 4fe00b4 commit 7412290

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

t/t9903-bash-prompt.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,12 @@ test_expect_success 'prompt - inside bare repository' '
248248

249249
test_expect_success 'prompt - interactive rebase' '
250250
printf " (b1|REBASE-i 2/3)" >expected
251-
echo "#!$SHELL_PATH" >fake_editor.sh &&
252-
cat >>fake_editor.sh <<\EOF &&
253-
echo "exec echo" >"$1"
254-
echo "edit $(git log -1 --format="%h")" >>"$1"
255-
echo "exec echo" >>"$1"
256-
EOF
251+
write_script fake_editor.sh <<-\EOF &&
252+
echo "exec echo" >"$1"
253+
echo "edit $(git log -1 --format="%h")" >>"$1"
254+
echo "exec echo" >>"$1"
255+
EOF
257256
test_when_finished "rm -f fake_editor.sh" &&
258-
chmod a+x fake_editor.sh &&
259257
test_set_editor "$TRASH_DIRECTORY/fake_editor.sh" &&
260258
git checkout b1 &&
261259
test_when_finished "git checkout master" &&

0 commit comments

Comments
 (0)