summaryrefslogtreecommitdiff
path: root/t/t5541-http-push.sh
diff options
context:
space:
mode:
authorTay Ray Chuan <rctay89@gmail.com>2010-01-25 07:42:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-25 17:53:02 (GMT)
commit9567f082ddc1f3143a153d0ecf59f3727ff0f7a5 (patch)
treea92f60d9e777167d37fb28d0b537e5314328f193 /t/t5541-http-push.sh
parent0aa958d4b40159d5e72a521dda1dbe8f6e769e89 (diff)
downloadgit-9567f082ddc1f3143a153d0ecf59f3727ff0f7a5.zip
git-9567f082ddc1f3143a153d0ecf59f3727ff0f7a5.tar.gz
git-9567f082ddc1f3143a153d0ecf59f3727ff0f7a5.tar.bz2
t5541-http-push: make grep expression check for one line only
Don't feed a multiple-line pattern to grep and expect the them to match with lines in order. Simplify the grep expressions in the non-fast-forward tests to check only for the first line of the non-fast-forward warning - having that line should be enough assurance that the full warning is printed. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5541-http-push.sh')
-rwxr-xr-xt/t5541-http-push.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/t/t5541-http-push.sh b/t/t5541-http-push.sh
index 83a8e14..53f54a2 100755
--- a/t/t5541-http-push.sh
+++ b/t/t5541-http-push.sh
@@ -105,10 +105,8 @@ test_expect_success 'non-fast-forward push show ref status' '
'
test_expect_success 'non-fast-forward push shows help message' '
- grep \
-"To prevent you from losing history, non-fast-forward updates were rejected
-Merge the remote changes before pushing again. See the '"'non-fast-forward'"'
-section of '"'git push --help'"' for details." output
+ grep "To prevent you from losing history, non-fast-forward updates were rejected" \
+ output
'
test_expect_success 'push fails for non-fast-forward refs unmatched by remote helper' '
@@ -126,10 +124,8 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
- grep \
-"To prevent you from losing history, non-fast-forward updates were rejected
-Merge the remote changes before pushing again. See the '"'non-fast-forward'"'
-section of '"'git push --help'"' for details." output
+ grep "To prevent you from losing history, non-fast-forward updates were rejected" \
+ output
'
stop_httpd