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

[PATCH 3/4] send-email: correct two tests which were going interactive

From
Jay Soffian <jaysoffian@gmail.com>
Date
Mar 31, 2009, 16:22 UTC
Message-ID
<232681e20e15a61defb73a1645fd2c6b6aadd751.1238516122.git.jaysoffian@gmail.com>
In-Reply-To
<77c8a8123cb66821775b03fa0f3d2744de82b79b.1238516122.git.jaysoffian@gmail.com>

Commit 67f1fe5 added two tests which went interactive under the dash shell. This commit corrects the issue. Reported by Björn Steinbrink <B.Steinbrink@gmx.de>

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
 t/t9001-send-email.sh |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 195ff8b..84238f7 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -478,7 +478,8 @@ test_expect_success 'confirm detects EOF (inform assumes y)' '
 test_expect_success 'confirm detects EOF (auto causes failure)' '
 	CONFIRM=$(git config --get sendemail.confirm) &&
 	git config sendemail.confirm auto &&
-	GIT_SEND_EMAIL_NOTTY=1 \
+	GIT_SEND_EMAIL_NOTTY=1 &&
+	export GIT_SEND_EMAIL_NOTTY &&
 		test_must_fail git send-email \
 			--from="Example <nobody@example.com>" \
 			--to=nobody@example.com \
@@ -492,8 +493,9 @@ test_expect_success 'confirm detects EOF (auto causes failure)' '
 test_expect_success 'confirm doesnt loop forever' '
 	CONFIRM=$(git config --get sendemail.confirm) &&
 	git config sendemail.confirm auto &&
-	yes "bogus" | GIT_SEND_EMAIL_NOTTY=1 \
-		test_must_fail git send-email \
+	GIT_SEND_EMAIL_NOTTY=1 &&
+	export GIT_SEND_EMAIL_NOTTY &&
+		yes "bogus" | test_must_fail git send-email \
 			--from="Example <nobody@example.com>" \
 			--to=nobody@example.com \
 			--smtp-server="$(pwd)/fake.sendmail" \
-- 
1.6.2.1.427.g15408
Previous: Jay SoffianNext: Jay Soffian
Message 4 of 7 in “send-email: correct various issues”
  1. 0/4 send-email: correct various issuesJay Soffian, Mar 31, 2009
  2. 1/4 send-email: don't attempt to prompt if tty is closedJay Soffian, Mar 31, 2009
  3. 2/4 send-email: ask_default should apply to all emails, not just the firstJay Soffian, Mar 31, 2009
  4. 3/4 send-email: correct two tests which were going interactiveJay Soffian, Mar 31, 2009
  5. 4/4 send-email: ensure quoted addresses are rfc2047 encodedJay Soffian, Mar 31, 2009
  6. Jeff KingMar 31, 2009
  7. Matthieu MoyApr 1, 2009

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.