tests: Set EDITOR=: and VISUAL=: globally
authorEric Wong <normalperson@yhbt.net>
Tue, 11 Jul 2006 19:01:54 +0000 (12:01 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 11 Jul 2006 19:32:54 +0000 (12:32 -0700)
This way we don't have to remember to set it for each test; and
if we forget, we won't cause interactive editors to be spawned
for non-interactive tests.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
t/annotate-tests.sh
t/t1400-update-ref.sh
t/t4013-diff-various.sh
t/test-lib.sh
index 1148b0257dafd4e9b63e030052b47b527b5c0d3b..b6a2edd8878c910ad177b8b277bedf99f60d9416 100644 (file)
@@ -94,7 +94,7 @@ test_expect_success \
 test_expect_success \
     'merge-setup part 4' \
     'echo "evil merge." >>file &&
-     EDITOR=: VISUAL=: git commit -a --amend'
+     git commit -a --amend'
 
 test_expect_success \
     'Two lines blamed on A, one on B, two on B1, one on B2, one on A U Thor' \
index 6a3515dd711f2f5cdf2e6d0f32d7b2897908b399..04fab26621af3aee3a44913ab290a4893b4f23ca 100755 (executable)
@@ -190,7 +190,6 @@ test_expect_success \
         GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
         h_OTHER=$(git-rev-parse --verify HEAD) &&
         echo FIXED >F &&
-        EDITOR=true \
         GIT_AUTHOR_DATE="2005-05-26 23:44" \
         GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
         h_FIXED=$(git-rev-parse --verify HEAD) &&
index 06837d1c7c053e9b4a97f120754fec22c50b2bd3..36658fb17df1c76c1550daa7282278a28fb4e5b1 100755 (executable)
@@ -70,7 +70,7 @@ test_expect_success setup '
        for i in 1 2; do echo $i; done >>dir/sub &&
        git update-index file0 dir/sub &&
 
-       EDITOR=: VISUAL=: git commit --amend &&
+       git commit --amend &&
        git show-branch
 '
 
index 05f6e79560ff7e3d92c47221b3ee7adec098e676..b0d7990a669cb053e5112bd459e9ecaffbd4c504 100755 (executable)
@@ -9,6 +9,8 @@ LC_ALL=C
 PAGER=cat
 TZ=UTC
 export LANG LC_ALL PAGER TZ
+EDITOR=:
+VISUAL=:
 unset AUTHOR_DATE
 unset AUTHOR_EMAIL
 unset AUTHOR_NAME
@@ -30,6 +32,7 @@ unset SHA1_FILE_DIRECTORIES
 unset SHA1_FILE_DIRECTORY
 export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
 export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
+export EDITOR VISUAL
 
 # Each test should start with something like this, after copyright notices:
 #