summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-01-13 11:33:34 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-13 11:33:35 -0800
commit9fac0777e16b6e342f7c84fb7059d6fca52505d2 (patch)
treee1a588d94b3f9727ef0586946d241798a6263551 /t
parentMerge branch 'br/sha1-name-40-hex-no-disambiguation' (diff)
parentpager: set LV=-c alongside LESS=FRSX (diff)
downloadtgif-9fac0777e16b6e342f7c84fb7059d6fca52505d2.tar.xz
Merge branch 'jn/pager-lv-default-env'
Just like we give a reasonable default for "less" via the LESS environment variable, specify a reasonable default for "lv" via the "LV" environment variable when spawning the pager. * jn/pager-lv-default-env: pager: set LV=-c alongside LESS=FRSX
Diffstat (limited to 't')
-rwxr-xr-xt/t7006-pager.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index ff2590849d..7fe3367b6b 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -37,6 +37,18 @@ test_expect_failure TTY 'pager runs from subdir' '
test_cmp expected actual
'
+test_expect_success TTY 'LESS and LV envvars are set for pagination' '
+ (
+ sane_unset LESS LV &&
+ PAGER="env >pager-env.out" &&
+ export PAGER &&
+
+ test_terminal git log
+ ) &&
+ grep ^LESS= pager-env.out &&
+ grep ^LV= pager-env.out
+'
+
test_expect_success TTY 'some commands do not use a pager' '
rm -f paginated.out &&
test_terminal git rev-list HEAD &&