git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v3 1/2] t7800-difftool: use "test_must_fail grep" instead of "! grep"

From
David Aguilar <davvid@gmail.com>
Date
Oct 27, 2014, 01:15 UTC
Message-ID
<1414372542-3485-1-git-send-email-davvid@gmail.com>
In-Reply-To
<544CAC30.7000607@kdbg.org>
Signed-off-by: David Aguilar <davvid@gmail.com>
---
This patch is new since v2.
This series now depends on "difftool--helper: exit when reading a prompt answer fails".
 t/t7800-difftool.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 9cf5dc9..b5b7f62 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -288,8 +288,8 @@ test_expect_success PERL 'say no to the first file' '
 	git difftool -x cat branch <input >output &&
 	grep m2 output &&
 	grep br2 output &&
-	! grep master output &&
-	! grep branch output
+	test_must_fail grep master output &&
+	test_must_fail grep branch output
 '
 
 test_expect_success PERL 'say no to the second file' '
@@ -297,16 +297,16 @@ test_expect_success PERL 'say no to the second file' '
 	git difftool -x cat branch <input >output &&
 	grep master output &&
 	grep branch output &&
-	! grep m2 output &&
-	! grep br2 output
+	test_must_fail grep m2 output &&
+	test_must_fail grep br2 output
 '
 
 test_expect_success PERL 'ending prompt input with EOF' '
 	git difftool -x cat branch </dev/null >output &&
-	! grep master output &&
-	! grep branch output &&
-	! grep m2 output &&
-	! grep br2 output
+	test_must_fail grep master output &&
+	test_must_fail grep branch output &&
+	test_must_fail grep m2 output &&
+	test_must_fail grep br2 output
 '
 
 test_expect_success PERL 'difftool --tool-help' '
-- 
2.1.2.557.g1025af0
Previous: Junio C HamanoNext: David Aguilar
Message 6 of 9 in “difftool--helper: exit when reading a prompt answer fails”
  1. Johannes SixtOct 26, 2014
  2. David AguilarOct 27, 2014
  3. David AguilarOct 27, 2014
  4. Michael J GruberOct 27, 2014
  5. Junio C HamanoOct 27, 2014
  6. 1/2 t7800-difftool: use "test_must_fail grep" instead of "! grep"David Aguilar, Oct 27, 2014
  7. 2/2 difftool: add support for --trust-exit-codeDavid Aguilar, Oct 27, 2014
  8. Junio C HamanoOct 27, 2014
  9. David AguilarOct 28, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.