X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/3ce5fec2ef4154369653a41eb7692aca25878298..d0329a7785d86495fd02ca595d9cb94fc67cdf4d:/t/t3300-edit.sh diff --git a/t/t3300-edit.sh b/t/t3300-edit.sh index 5772e48..ad3b23f 100755 --- a/t/t3300-edit.sh +++ b/t/t3300-edit.sh @@ -93,13 +93,13 @@ mkeditor () { cat > "$1" <> "\$1" +printf "\n$1" >> "\$1" EOF chmod a+x "$1" } mkeditor vi -test_expect_failure 'Edit commit message interactively (vi)' ' +test_expect_success 'Edit commit message interactively (vi)' ' m=$(msg HEAD) && PATH=.:$PATH stg edit p2 && test "$(msg HEAD)" = "$m/vi" @@ -114,14 +114,14 @@ test_expect_success 'Edit commit message interactively (EDITOR)' ' ' mkeditor e2 -test_expect_failure 'Edit commit message interactively (VISUAL)' ' +test_expect_success 'Edit commit message interactively (VISUAL)' ' m=$(msg HEAD) && VISUAL=./e2 EDITOR=./e1 PATH=.:$PATH stg edit p2 && test "$(msg HEAD)" = "$m/e2" ' mkeditor e3 -test_expect_failure 'Edit commit message interactively (core.editor)' ' +test_expect_success 'Edit commit message interactively (core.editor)' ' m=$(msg HEAD) && git config core.editor e3 && VISUAL=./e2 EDITOR=./e1 PATH=.:$PATH stg edit p2 && @@ -137,7 +137,7 @@ test_expect_success 'Edit commit message interactively (stgit.editor)' ' ' mkeditor e5 -test_expect_failure 'Edit commit message interactively (GIT_EDITOR)' ' +test_expect_success 'Edit commit message interactively (GIT_EDITOR)' ' m=$(msg HEAD) && GIT_EDITOR=./e5 VISUAL=./e2 EDITOR=./e1 PATH=.:$PATH stg edit p2 && test "$(msg HEAD)" = "$m/e5" @@ -148,7 +148,7 @@ git config --unset core.editor git config --unset stgit.editor mkeditor twoliner -test_expect_failure 'Both noninterative and interactive editing' ' +test_expect_success 'Both noninterative and interactive editing' ' EDITOR=./twoliner stg edit -e -m "oneliner" p2 && test "$(msg HEAD)" = "oneliner/twoliner" '