remote-hg: add test to push new bookmark
authorFelipe Contreras <felipe.contreras@gmail.com>
Sat, 25 May 2013 02:29:40 +0000 (21:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2013 14:59:57 +0000 (07:59 -0700)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/remote-helpers/test-hg.sh
index c36b729770ecf95309feb1de7fc4029acdd9d9c5..8d70f4aefced6ce6dcc3eb7827923dbeba100427 100755 (executable)
@@ -117,6 +117,21 @@ test_expect_success 'update bookmark' '
        check_bookmark hgrepo devel devel
 '
 
+test_expect_success 'new bookmark' '
+       test_when_finished "rm -rf gitrepo*" &&
+
+       (
+       git clone "hg::hgrepo" gitrepo &&
+       cd gitrepo &&
+       git checkout --quiet -b feature-b &&
+       echo feature-b > content &&
+       git commit -a -m feature-b &&
+       git push --quiet origin feature-b
+       ) &&
+
+       check_bookmark hgrepo feature-b feature-b
+'
+
 # cleanup previous stuff
 rm -rf hgrepo
 
@@ -288,4 +303,19 @@ test_expect_success 'remote update bookmark' '
        check_bookmark hgrepo devel devel
 '
 
+test_expect_success 'remote new bookmark' '
+       test_when_finished "rm -rf gitrepo*" &&
+
+       (
+       git clone "hg::hgrepo" gitrepo &&
+       cd gitrepo &&
+       git checkout --quiet -b feature-b &&
+       echo feature-b > content &&
+       git commit -a -m feature-b &&
+       git push --quiet origin feature-b
+       ) &&
+
+       check_bookmark hgrepo feature-b feature-b
+'
+
 test_done