Skip to content

Commit

Permalink
bash prompt: use 'write_script' helper in interactive rebase test
Browse files Browse the repository at this point in the history
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
  • Loading branch information
SZEDER Gábor committed Jun 23, 2013
1 parent 4fe00b4 commit 7412290
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions t/t9903-bash-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" &&
Expand Down

0 comments on commit 7412290

Please sign in to comment.