summaryrefslogtreecommitdiff
path: root/t/t7006-pager.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-03-31 16:30:40 -0700
committerJunio C Hamano <gitster@pobox.com>2014-03-31 16:30:40 -0700
commitfa73d354689aa577d564b03d22f87c34b6288a78 (patch)
treed9b0fafb6bd690397265aae2d549489546dfe004 /t/t7006-pager.sh
parent96e67c86f817b4fbd492b12f57dae4bd821571ba (diff)
parent512477b175288a429aaf4071dc9fe94f17f0e4ee (diff)
downloadgit-fa73d354689aa577d564b03d22f87c34b6288a78.tar.gz
Merge branch 'dt/tests-with-env-not-subshell'
* dt/tests-with-env-not-subshell: tests: use "env" to run commands with temporary env-var settings
Diffstat (limited to 't/t7006-pager.sh')
-rwxr-xr-xt/t7006-pager.sh18
1 files changed, 3 insertions, 15 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index b9365b431d..da958a8b56 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -146,11 +146,7 @@ test_expect_success 'no color when stdout is a regular file' '
test_expect_success TTY 'color when writing to a pager' '
rm -f paginated.out &&
test_config color.ui auto &&
- (
- TERM=vt100 &&
- export TERM &&
- test_terminal git log
- ) &&
+ test_terminal env TERM=vt100 git log &&
colorful paginated.out
'
@@ -158,11 +154,7 @@ test_expect_success TTY 'colors are suppressed by color.pager' '
rm -f paginated.out &&
test_config color.ui auto &&
test_config color.pager false &&
- (
- TERM=vt100 &&
- export TERM &&
- test_terminal git log
- ) &&
+ test_terminal env TERM=vt100 git log &&
! colorful paginated.out
'
@@ -181,11 +173,7 @@ test_expect_success 'color when writing to a file intended for a pager' '
test_expect_success TTY 'colors are sent to pager for external commands' '
test_config alias.externallog "!git log" &&
test_config color.ui auto &&
- (
- TERM=vt100 &&
- export TERM &&
- test_terminal git -p externallog
- ) &&
+ test_terminal env TERM=vt100 git -p externallog &&
colorful paginated.out
'