]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t7005-editor.sh
Do not use VISUAL editor on dumb terminals
[thirdparty/git.git] / t / t7005-editor.sh
index b647957d75fa0d0ce4d88c7c3c7243f31af38b4a..a95fe19d8c2f8bea39573aa0bc2c7f47a97d6127 100755 (executable)
@@ -42,6 +42,16 @@ test_expect_success 'dumb should error out when falling back on vi' '
        fi
 '
 
+test_expect_success 'dumb should prefer EDITOR to VISUAL' '
+
+       EDITOR=./e-EDITOR.sh &&
+       VISUAL=./e-VISUAL.sh &&
+       export EDITOR VISUAL &&
+       git commit --amend &&
+       test "$(git show -s --format=%s)" = "Edited by EDITOR"
+
+'
+
 TERM=vt100
 export TERM
 for i in vi EDITOR VISUAL core_editor GIT_EDITOR