summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Eric Wong <normalperson@yhbt.net>2006-07-11 12:01:54 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2006-07-11 12:32:54 -0700
commit8ff99e7417fcbff67d2c31445671fa97e44c95e7 (patch)
tree133e202e99a5454c6b33a94564984b59e7aef5be
parentLog ref changes made by git-fetch and git-pull. (diff)
downloadtgif-8ff99e7417fcbff67d2c31445671fa97e44c95e7.tar.xz
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>
-rw-r--r--t/annotate-tests.sh2
-rwxr-xr-xt/t1400-update-ref.sh1
-rwxr-xr-xt/t4013-diff-various.sh2
-rwxr-xr-xt/test-lib.sh3
4 files changed, 5 insertions, 3 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 1148b0257d..b6a2edd887 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -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' \
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index 6a3515dd71..04fab26621 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -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) &&
diff --git a/t/t4013-diff-various.sh b/t/t4013-diff-various.sh
index 06837d1c7c..36658fb17d 100755
--- a/t/t4013-diff-various.sh
+++ b/t/t4013-diff-various.sh
@@ -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
'
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 05f6e79560..b0d7990a66 100755
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -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:
#