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

[PATCH] adapt request-pull tests for new pull request format

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 24, 2010, 12:29 UTC
Message-ID
<20100424122952.GA14196@progeny.tock>
In-Reply-To
<20100424121151.GA12312@progeny.tock>

10eb0007 (request-pull: avoid mentioning that the start point is a single commit, 2010-01-29), changed the pull request format, so the test needs some changes to still pass:

 - tolerate a missing blank line between “in the git repository at:”
   and the name of repository and branch
 - recognize subject and date in the new request format
 - update the expected request template to match the new format
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 t/t5150-request-pull.sh |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t5150-request-pull.sh b/t/t5150-request-pull.sh
index 4c7f48a..b31b828 100644
--- a/t/t5150-request-pull.sh
+++ b/t/t5150-request-pull.sh
@@ -69,8 +69,7 @@ test_expect_success 'setup: two scripts for reading pull requests' '
 	#!/bin/sed -nf
 	/ in the git repository at:$/! d
 	n
-	/^$/! q
-	n
+	/^$/ n
 	s/^[ 	]*\(.*\) \([^ ]*\)/please pull\
 	\1\
 	\2/p
@@ -81,7 +80,9 @@ test_expect_success 'setup: two scripts for reading pull requests' '
 	#!/bin/sed -nf
 	s/$_x40/OBJECT_NAME/g
 	s/A U Thor/AUTHOR/g
+	s/[-0-9]\{10\} [:0-9]\{8\} [-+][0-9]\{4\}/DATE/g
 	s/        [^ ].*/        SUBJECT/g
+	s/  [^ ].* (DATE)/  SUBJECT (DATE)/g
 	s/$downstream_url_for_sed/URL/g
 	s/for-upstream/BRANCH/g
 	s/mnemonic.txt/FILENAME/g
@@ -188,11 +189,10 @@ test_expect_success 'pull request format' '
 	git init --bare downstream.git &&
 	cat <<-\EOT >expect &&
 	The following changes since commit OBJECT_NAME:
-	  AUTHOR (1):
-	        SUBJECT
 
-	are available in the git repository at:
+	  SUBJECT (DATE)
 
+	are available in the git repository at:
 	  URL BRANCH
 
 	SHORTLOG
-- 
1.7.1.rc1
Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 6 in “request-pull: protect against OPTIONS_KEEPDASHDASH from environment”
  1. 0/2 request-pull: protect against OPTIONS_KEEPDASHDASH from environmentJonathan Nieder, Apr 24, 2010
  2. 1/2 tests for request-pullJonathan Nieder, Apr 24, 2010
  3. adapt request-pull tests for new pull request formatJonathan Nieder, Apr 24, 2010
  4. 2/2 request-pull: protect against OPTIONS_KEEPDASHDASH from environmentJonathan Nieder, Apr 24, 2010
  5. Thomas RastApr 25, 2010
  6. Miklos VajnaApr 26, 2010

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.