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>
This commit is contained in:
SZEDER Gábor 2012-08-24 20:03:58 +02:00
Родитель 4fe00b4f0a
Коммит 7412290cc4
1 изменённых файлов: 5 добавлений и 7 удалений

Просмотреть файл

@ -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" &&