File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -351,11 +351,15 @@ test_expect_success 'test --format long' '
351351 test_cmp expected actual
352352'
353353
354- test_expect_success ' setup a fake editor ' '
355- write_script fakeeditor <<-\EOF
354+ test_expect_success ' setup fake editors ' '
355+ write_script fakeeditor <<-\EOF &&
356356 sed -e "s/A U Thor/A fake Thor/" "$1" >"$1.new"
357357 mv "$1.new" "$1"
358358 EOF
359+ write_script failingfakeeditor <<-\EOF
360+ ./fakeeditor "$@"
361+ false
362+ EOF
359363'
360364
361365test_expect_success ' --edit with and without already replaced object' '
@@ -372,7 +376,7 @@ test_expect_success '--edit with and without already replaced object' '
372376test_expect_success ' --edit and change nothing or command failed' '
373377 git replace -d "$PARA3" &&
374378 test_must_fail env GIT_EDITOR=true git replace --edit "$PARA3" &&
375- test_must_fail env GIT_EDITOR="./fakeeditor;false " git replace --edit "$PARA3" &&
379+ test_must_fail env GIT_EDITOR="./failingfakeeditor " git replace --edit "$PARA3" &&
376380 GIT_EDITOR=./fakeeditor git replace --edit "$PARA3" &&
377381 git replace -l | grep "$PARA3" &&
378382 git cat-file commit "$PARA3" | grep "A fake Thor"
You can’t perform that action at this time.
0 commit comments