git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ariadne Conill <ariadne@dereferenced.org>
To: git@vger.kernel.org
Cc: Ariadne Conill <ariadne@dereferenced.org>
Subject: [PATCH v2 3/3] tests: defang pager tests by explicitly disabling the log.mailmap warning
Date: Fri, 12 Jul 2019 18:02:04 -0500	[thread overview]
Message-ID: <20190712230204.16749-4-ariadne@dereferenced.org> (raw)
In-Reply-To: <20190712230204.16749-1-ariadne@dereferenced.org>

In the previous patch, we added a deprecation warning for the current
log.mailmap setting. This warning only appears when git is attached to
a controlling terminal. Some tests however run under an emulated
terminal, so we need to disable the warning for those tests.

Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
---
 t/t7006-pager.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/t/t7006-pager.sh b/t/t7006-pager.sh
index 00e09a375c..1c72aae197 100755
--- a/t/t7006-pager.sh
+++ b/t/t7006-pager.sh
@@ -304,6 +304,7 @@ test_expect_success 'tests can detect color' '
 
 test_expect_success 'no color when stdout is a regular file' '
 	rm -f colorless.log &&
+	test_config log.mailmap false &&
 	test_config color.ui auto &&
 	git log >colorless.log &&
 	! colorful colorless.log
@@ -311,6 +312,7 @@ test_expect_success 'no color when stdout is a regular file' '
 
 test_expect_success TTY 'color when writing to a pager' '
 	rm -f paginated.out &&
+	test_config log.mailmap false &&
 	test_config color.ui auto &&
 	test_terminal git log &&
 	colorful paginated.out
@@ -318,6 +320,7 @@ test_expect_success TTY 'color when writing to a pager' '
 
 test_expect_success TTY 'colors are suppressed by color.pager' '
 	rm -f paginated.out &&
+	test_config log.mailmap false &&
 	test_config color.ui auto &&
 	test_config color.pager false &&
 	test_terminal git log &&
@@ -326,6 +329,7 @@ test_expect_success TTY 'colors are suppressed by color.pager' '
 
 test_expect_success 'color when writing to a file intended for a pager' '
 	rm -f colorful.log &&
+	test_config log.mailmap false &&
 	test_config color.ui auto &&
 	(
 		TERM=vt100 &&
@@ -337,6 +341,7 @@ test_expect_success 'color when writing to a file intended for a pager' '
 '
 
 test_expect_success TTY 'colors are sent to pager for external commands' '
+	test_config log.mailmap false &&
 	test_config alias.externallog "!git log" &&
 	test_config color.ui auto &&
 	test_terminal git -p externallog &&
@@ -573,6 +578,7 @@ test_expect_success TTY 'command-specific pager' '
 	sane_unset PAGER GIT_PAGER &&
 	echo "foo:initial" >expect &&
 	>actual &&
+	test_config log.mailmap false &&
 	test_unconfig core.pager &&
 	test_config pager.log "sed s/^/foo:/ >actual" &&
 	test_terminal git log --format=%s -1 &&
@@ -583,6 +589,7 @@ test_expect_success TTY 'command-specific pager overrides core.pager' '
 	sane_unset PAGER GIT_PAGER &&
 	echo "foo:initial" >expect &&
 	>actual &&
+	test_config log.mailmap false &&
 	test_config core.pager "exit 1" &&
 	test_config pager.log "sed s/^/foo:/ >actual" &&
 	test_terminal git log --format=%s -1 &&
@@ -593,6 +600,7 @@ test_expect_success TTY 'command-specific pager overridden by environment' '
 	GIT_PAGER="sed s/^/foo:/ >actual" && export GIT_PAGER &&
 	>actual &&
 	echo "foo:initial" >expect &&
+	test_config log.mailmap false &&
 	test_config pager.log "exit 1" &&
 	test_terminal git log --format=%s -1 &&
 	test_cmp expect actual
@@ -610,6 +618,7 @@ test_expect_success TTY 'command-specific pager works for external commands' '
 	sane_unset PAGER GIT_PAGER &&
 	echo "foo:initial" >expect &&
 	>actual &&
+	test_config log.mailmap false &&
 	test_config pager.external "sed s/^/foo:/ >actual" &&
 	test_terminal git --exec-path="$(pwd)" external log --format=%s -1 &&
 	test_cmp expect actual
@@ -619,6 +628,7 @@ test_expect_success TTY 'sub-commands of externals use their own pager' '
 	sane_unset PAGER GIT_PAGER &&
 	echo "foo:initial" >expect &&
 	>actual &&
+	test_config log.mailmap false &&
 	test_config pager.log "sed s/^/foo:/ >actual" &&
 	test_terminal git --exec-path=. external log --format=%s -1 &&
 	test_cmp expect actual
-- 
2.17.1


  parent reply	other threads:[~2019-07-12 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 23:02 [PATCH v2 0/3] document deprecation of log.mailmap=false default Ariadne Conill
2019-07-12 23:02 ` [PATCH v2 1/3] log: add warning for unspecified log.mailmap setting Ariadne Conill
2019-07-14 21:55   ` Junio C Hamano
2019-07-12 23:02 ` [PATCH v2 2/3] documentation: mention --no-use-mailmap and log.mailmap false setting Ariadne Conill
2019-07-12 23:02 ` Ariadne Conill [this message]
2019-07-14 21:56   ` [PATCH v2 3/3] tests: defang pager tests by explicitly disabling the log.mailmap warning Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190712230204.16749-4-ariadne@dereferenced.org \
    --to=ariadne@dereferenced.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).