diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-12-12 21:49:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-12-12 21:49:52 -0800 |
commit | 33935dca6db41f3d84f28abb66f94c1f2cc1974b (patch) | |
tree | 9fd1c26d37960ad336bfbebf5b339b624168439c /t/t4014-format-patch.sh | |
parent | Merge branch 'ef/win32-dirent' (diff) | |
parent | format-patch: page output with --stdout (diff) | |
download | tgif-33935dca6db41f3d84f28abb66f94c1f2cc1974b.tar.xz |
Merge branch 'tc/format-patch-p'
* tc/format-patch-p:
format-patch: page output with --stdout
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-x | t/t4014-format-patch.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index 07bf6eb49d..027c13d52c 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -6,6 +6,7 @@ test_description='various format-patch tests' . ./test-lib.sh +. "$TEST_DIRECTORY"/lib-terminal.sh test_expect_success setup ' @@ -686,4 +687,26 @@ test_expect_success 'format-patch --signature="" supresses signatures' ' ! grep "^-- \$" output ' +test_expect_success TTY 'format-patch --stdout paginates' ' + rm -f pager_used && + ( + GIT_PAGER="wc >pager_used" && + export GIT_PAGER && + test_terminal git format-patch --stdout --all + ) && + test_path_is_file pager_used +' + + test_expect_success TTY 'format-patch --stdout pagination can be disabled' ' + rm -f pager_used && + ( + GIT_PAGER="wc >pager_used" && + export GIT_PAGER && + test_terminal git --no-pager format-patch --stdout --all && + test_terminal git -c "pager.format-patch=false" format-patch --stdout --all + ) && + test_path_is_missing pager_used && + test_path_is_missing .git/pager_used +' + test_done |