adapt request-pull tests for new pull request format
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> Acked-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Apr 24, 2010 at 07:29 UTC
f2cabf6abfb1ebf8c1f1a4789ae003990b5f0ba9
1 file changed
+5
-5
t/t5150-request-pull.sh
+5
-5
@@ -69,8 +69,7 @@ test_expect_success 'setup: two scripts for reading pull requests' '
69
#!/bin/sed -nf
70
/ in the git repository at:$/! d
71
n
72
- /^$/! q
73
- n
72
+ /^$/ n
73
s/^[ ]*\(.*\) \([^ ]*\)/please pull\
74
\1\
75
\2/p
@@ -81,7 +80,9 @@ test_expect_success 'setup: two scripts for reading pull requests' '
80
#!/bin/sed -nf
81
s/$_x40/OBJECT_NAME/g
82
s/A U Thor/AUTHOR/g
83
+ s/[-0-9]\{10\} [:0-9]\{8\} [-+][0-9]\{4\}/DATE/g
84
s/ [^ ].*/ SUBJECT/g
85
+ s/ [^ ].* (DATE)/ SUBJECT (DATE)/g
86
s/$downstream_url_for_sed/URL/g
87
s/for-upstream/BRANCH/g
88
s/mnemonic.txt/FILENAME/g
@@ -188,11 +189,10 @@ test_expect_success 'pull request format' '
189
git init --bare downstream.git &&
190
cat <<-\EOT >expect &&
191
The following changes since commit OBJECT_NAME:
191
- AUTHOR (1):
192
- SUBJECT
192
194
- are available in the git repository at:
193
+ SUBJECT (DATE)
194
195
+ are available in the git repository at:
196
URL BRANCH
197
198
SHORTLOG