git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 3/3] t2106: ensure that the checkout fails for the expected reason
Date: Wed, 18 Nov 2020 14:49:07 +0000	[thread overview]
Message-ID: <7a750f1317143bf4488c21bd11c4e59558a3d7c6.1605710947.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.792.git.1605710947.gitgitgadget@gmail.com>

From: Johannes Schindelin <johannes.schindelin@gmx.de>

During the transition of the test suite to a new default branch name, it
was noticed that this test case succeeded for the wrong reason when the
default branch name was overridden.

While we fixed that in the previous commit, let's make sure that we look
for a tell-tale in the error message that the `git checkout` failed for
the reason we wanted it to fail.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t2106-update-index-assume-unchanged.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/t/t2106-update-index-assume-unchanged.sh b/t/t2106-update-index-assume-unchanged.sh
index 3396f23363..2d450daf5c 100755
--- a/t/t2106-update-index-assume-unchanged.sh
+++ b/t/t2106-update-index-assume-unchanged.sh
@@ -20,7 +20,8 @@ test_expect_success 'do not switch branches with dirty file' '
 	git checkout other &&
 	echo dirt >file &&
 	git update-index --assume-unchanged file &&
-	test_must_fail git checkout -
+	test_must_fail git checkout - 2>err &&
+	test_i18ngrep overwritten err
 '
 
 test_done
-- 
gitgitgadget

  parent reply	other threads:[~2020-11-18 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-18 14:49 [PATCH 0/3] t2106 vs. the default branch name Johannes Schindelin via GitGitGadget
2020-11-18 14:49 ` [PATCH 1/3] t2106: adjust style to the current conventions Johannes Schindelin via GitGitGadget
2020-11-18 14:49 ` [PATCH 2/3] t2106: make test independent of the current main branch name Johannes Schindelin via GitGitGadget
2020-11-18 18:26   ` Junio C Hamano
2020-11-18 14:49 ` Johannes Schindelin via GitGitGadget [this message]
2020-11-18 20:46 ` [PATCH 0/3] t2106 vs. the default " Junio C Hamano
2020-11-18 20:56   ` Johannes Schindelin
2020-11-18 21:53     ` Junio C Hamano
2020-11-18 22:25       ` Johannes Schindelin

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=7a750f1317143bf4488c21bd11c4e59558a3d7c6.1605710947.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=johannes.schindelin@gmx.de \
    /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).