2013-11-25 22:03:06 +01:00
|
|
|
# Helpers for tests of git's choice of pager.
|
2010-06-12 18:36:51 +02:00
|
|
|
|
|
|
|
test_expect_success 'determine default pager' '
|
|
|
|
test_might_fail git config --unset core.pager &&
|
|
|
|
less=$(
|
2021-12-09 06:10:57 +01:00
|
|
|
sane_unset PAGER GIT_PAGER &&
|
2010-06-12 18:36:51 +02:00
|
|
|
git var GIT_PAGER
|
|
|
|
) &&
|
|
|
|
test -n "$less"
|
|
|
|
'
|
|
|
|
|
2010-06-21 19:37:13 +02:00
|
|
|
if expr "$less" : '[a-z][a-z]*$' >/dev/null
|
2010-06-12 18:36:51 +02:00
|
|
|
then
|
|
|
|
test_set_prereq SIMPLEPAGER
|
|
|
|
fi
|