t7006: replace dubious test
[gitweb.git] / t / t7006-pager.sh
index c8dc665f2fdd0f0452779e6f8576395f8b3bdf11..304ae06c600fc93431a501d0498115f72279a1bb 100755 (executable)
@@ -378,9 +378,19 @@ test_GIT_PAGER_overrides  expect_success test_must_fail 'git -p request-pull'
 test_default_pager        expect_success test_must_fail 'git -p'
 test_PAGER_overrides      expect_success test_must_fail 'git -p'
 test_local_config_ignored expect_failure test_must_fail 'git -p'
-test_no_local_config_subdir expect_success test_must_fail 'git -p'
 test_GIT_PAGER_overrides  expect_success test_must_fail 'git -p'
 
+test_expect_failure TTY 'core.pager in repo config works and retains cwd' '
+       sane_unset GIT_PAGER &&
+       test_config core.pager "cat >cwd-retained" &&
+       (
+               cd sub &&
+               rm -f cwd-retained &&
+               test_terminal git -p rev-parse HEAD &&
+               test_path_is_file cwd-retained
+       )
+'
+
 test_doesnt_paginate      expect_failure test_must_fail 'git -p nonsense'
 
 test_pager_choices                       'git shortlog'