remote-hg: add test to push new bookmark

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed May 24, 2013 at 21:29 UTC e14432f798d6575b5c8269982758c0916a5f13c5
1 file changed +30
contrib/remote-helpers/test-hg.sh
+30
@@ -117,6 +117,21 @@ test_expect_success 'update bookmark' '
117 check_bookmark hgrepo devel devel
118 '
119
120 +test_expect_success 'new bookmark' '
121 + test_when_finished "rm -rf gitrepo*" &&
122 +
123 + (
124 + git clone "hg::hgrepo" gitrepo &&
125 + cd gitrepo &&
126 + git checkout --quiet -b feature-b &&
127 + echo feature-b > content &&
128 + git commit -a -m feature-b &&
129 + git push --quiet origin feature-b
130 + ) &&
131 +
132 + check_bookmark hgrepo feature-b feature-b
133 +'
134 +
135 # cleanup previous stuff
136 rm -rf hgrepo
137
@@ -288,4 +303,19 @@ test_expect_success 'remote update bookmark' '
303 check_bookmark hgrepo devel devel
304 '
305
306 +test_expect_success 'remote new bookmark' '
307 + test_when_finished "rm -rf gitrepo*" &&
308 +
309 + (
310 + git clone "hg::hgrepo" gitrepo &&
311 + cd gitrepo &&
312 + git checkout --quiet -b feature-b &&
313 + echo feature-b > content &&
314 + git commit -a -m feature-b &&
315 + git push --quiet origin feature-b
316 + ) &&
317 +
318 + check_bookmark hgrepo feature-b feature-b
319 +'
320 +
321 test_done