summaryrefslogtreecommitdiff
path: root/contrib/remote-helpers/test-hg.sh
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-25 02:29:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-05-28 14:59:56 (GMT)
commitb082b4f94ff1a82ce42223f7a46c9423e99c48e9 (patch)
treecb9ae38f81fa3377998c4e143b5405e71126ca36 /contrib/remote-helpers/test-hg.sh
parent0067ecc82b2dbef64d3768484eb6a1b4ca2c27d2 (diff)
downloadgit-b082b4f94ff1a82ce42223f7a46c9423e99c48e9.zip
git-b082b4f94ff1a82ce42223f7a46c9423e99c48e9.tar.gz
git-b082b4f94ff1a82ce42223f7a46c9423e99c48e9.tar.bz2
remote-hg: add check_bookmark() test helper
And check in a more proper way. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/remote-helpers/test-hg.sh')
-rwxr-xr-xcontrib/remote-helpers/test-hg.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh
index d244e23..4e56640 100755
--- a/contrib/remote-helpers/test-hg.sh
+++ b/contrib/remote-helpers/test-hg.sh
@@ -32,6 +32,12 @@ check_branch () {
test_cmp expected actual
}
+check_bookmark () {
+ echo $3 > expected &&
+ hg -R $1 log -r "bookmark('$2')" --template '{desc}\n' > actual &&
+ test_cmp expected actual
+}
+
setup () {
(
echo "[ui]"
@@ -108,7 +114,7 @@ test_expect_success 'update bookmark' '
git push --quiet
) &&
- hg -R hgrepo bookmarks | egrep "devel[ ]+3:"
+ check_bookmark hgrepo devel devel
'
# cleanup previous stuff