tests: Set EDITOR=: and VISUAL=: globally
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>
Eric Wong committed
Jul 11, 2006 at 12:01 UTC
8ff99e7417fcbff67d2c31445671fa97e44c95e7
4 files changed
+5
-3
t/annotate-tests.sh
+1
-1
@@ -94,7 +94,7 @@ test_expect_success \
94
test_expect_success \
95
'merge-setup part 4' \
96
'echo "evil merge." >>file &&
97
- EDITOR=: VISUAL=: git commit -a --amend'
97
+ git commit -a --amend'
98
99
test_expect_success \
100
'Two lines blamed on A, one on B, two on B1, one on B2, one on A U Thor' \
t/t1400-update-ref.sh
-1
@@ -190,7 +190,6 @@ test_expect_success \
190
GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
191
h_OTHER=$(git-rev-parse --verify HEAD) &&
192
echo FIXED >F &&
193
- EDITOR=true \
193
GIT_AUTHOR_DATE="2005-05-26 23:44" \
194
GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
195
h_FIXED=$(git-rev-parse --verify HEAD) &&
t/t4013-diff-various.sh
+1
-1
@@ -70,7 +70,7 @@ test_expect_success setup '
70
for i in 1 2; do echo $i; done >>dir/sub &&
71
git update-index file0 dir/sub &&
72
73
- EDITOR=: VISUAL=: git commit --amend &&
73
+ git commit --amend &&
74
git show-branch
75
'
76
t/test-lib.sh
+3
@@ -9,6 +9,8 @@ LC_ALL=C
9
PAGER=cat
10
TZ=UTC
11
export LANG LC_ALL PAGER TZ
12
+EDITOR=:
13
+VISUAL=:
14
unset AUTHOR_DATE
15
unset AUTHOR_EMAIL
16
unset AUTHOR_NAME
@@ -30,6 +32,7 @@ unset SHA1_FILE_DIRECTORIES
32
unset SHA1_FILE_DIRECTORY
33
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
34
export GIT_COMMITTER_EMAIL GIT_COMMITTER_NAME
35
+export EDITOR VISUAL
36
37
# Each test should start with something like this, after copyright notices:
38
#