[PATCH 4/9] t7006: test pager.<cmd> configuration

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jonathan Nieder
Date: Monday, April 12, 2010 - 7:25 pm

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t7006-pager.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 944e830..237a689 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -71,6 +71,22 @@ test_expect_success TTY 'git --paginate rev-list uses a pager' '
 	test -e paginated.out
 '
 
+rm -f paginated.out
+test_expect_success TTY 'git rev-list uses a pager if configured to' '
+	git config pager.rev-list true &&
+	test_terminal git rev-list HEAD &&
+	test -e paginated.out
+'
+git config --unset pager.rev-list
+
+rm -f paginated.out
+test_expect_failure TTY 'git config uses a pager if configured to' '
+	git config pager.config true &&
+	test_terminal git config --list &&
+	test -e paginated.out
+'
+git --no-pager config --unset pager.config
+
 rm -f file paginated.out
 test_expect_success 'no pager even with --paginate when stdout is a pipe' '
 	git --paginate log | cat &&
@@ -239,4 +255,8 @@ test_pager_choice test_must_fail 'git -p' failure no
 
 doesnt_paginate test_must_fail 'git -p nonsense'
 
+doesnt_paginate 'git rev-list HEAD'
+git config pager.rev-list true
+test_pager_choice 'git rev-list HEAD'
+
 test_done
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH/RFC 0/9] Setup cleanup, chapter one, Jonathan Nieder, (Mon Apr 12, 7:11 pm)
[PATCH 3/9] builtins: do not commit pager choice early, Jonathan Nieder, (Mon Apr 12, 7:24 pm)
[PATCH 4/9] t7006: test pager.<cmd> configuration, Jonathan Nieder, (Mon Apr 12, 7:25 pm)
[PATCH 5/9] builtin: introduce startup_info struct, Jonathan Nieder, (Mon Apr 12, 7:27 pm)
[PATCH 6/9] builtin: remember whether repository was found, Jonathan Nieder, (Mon Apr 12, 7:28 pm)
[PATCH 9/9] config: run setup before commiting pager choice, Jonathan Nieder, (Mon Apr 12, 7:31 pm)
Re: [PATCH 8/9] builtin: check pager.&lt;cmd&gt; configuration i ..., Nguyen Thai Ngoc Duy, (Mon Apr 12, 10:29 pm)
[PATCH 3/9 v2] builtins: do not commit pager choice early, Jonathan Nieder, (Tue Apr 13, 7:17 pm)
[PATCH 4/9 v2] t7006: test pager.&lt;cmd&gt; configuration, Jonathan Nieder, (Tue Apr 13, 7:19 pm)
Re: [RFC/PATCH 00/46] nd/setup remainder for convenient re ..., Nguyen Thai Ngoc Duy, (Wed Apr 14, 12:59 am)
Re: [PATCH/RFC 0/9] Setup cleanup, chapter one, Junio C Hamano, (Wed Apr 14, 1:54 pm)
Re: [PATCH/RFC 0/9] Setup cleanup, chapter one, Jonathan Nieder, (Wed Apr 14, 5:05 pm)
[PATCH] t7006: guard cleanup with test_expect_success, Jonathan Nieder, (Wed Apr 14, 5:38 pm)
Re: [PATCH] t7006: guard cleanup with test_expect_success, Junio C Hamano, (Wed Apr 14, 5:56 pm)
Re: [PATCH] t7006: guard cleanup with test_expect_success, Jonathan Nieder, (Wed Apr 14, 6:27 pm)
Re: [PATCH 8/9] builtin: check pager.&lt;cmd&gt; configuration i ..., Nguyen Thai Ngoc Duy, (Thu Apr 15, 10:43 am)