fi
test_expect_success 'setup' '
- unset GIT_PAGER GIT_PAGER_IN_USE;
+ sane_unset GIT_PAGER GIT_PAGER_IN_USE &&
test_might_fail git config --unset core.pager &&
PAGER="cat >paginated.out" &&
! test -e paginated.out
'
-test_expect_success 'git config uses a pager if configured to' '
+test_expect_success TTY 'git config uses a pager if configured to' '
rm -f paginated.out &&
git config pager.config true &&
test_when_finished "git config --unset pager.config" &&
test -e paginated.out
'
-test_expect_success 'configuration can enable pager (from subdir)' '
+test_expect_success TTY 'configuration can enable pager (from subdir)' '
rm -f paginated.out &&
mkdir -p subdir &&
git config pager.bundle true &&
parse_args "$@"
$test_expectation SIMPLEPAGERTTY "$cmd - default pager is used by default" "
- unset PAGER GIT_PAGER;
+ sane_unset PAGER GIT_PAGER &&
test_might_fail git config --unset core.pager &&
rm -f default_pager_used ||
cleanup_fail &&
parse_args "$@"
$test_expectation TTY "$cmd - PAGER overrides default pager" "
- unset GIT_PAGER;
+ sane_unset GIT_PAGER &&
test_might_fail git config --unset core.pager &&
rm -f PAGER_used ||
cleanup_fail &&
parse_args "$@"
$test_expectation TTY "$cmd - repository-local core.pager setting $used_if_wanted" "
- unset GIT_PAGER;
+ sane_unset GIT_PAGER &&
rm -f core.pager_used ||
cleanup_fail &&
parse_args "$@"
$test_expectation TTY "$cmd - core.pager $used_if_wanted from subdirectory" "
- unset GIT_PAGER;
+ sane_unset GIT_PAGER &&
rm -f core.pager_used &&
rm -fr sub ||
cleanup_fail &&