From b082b4f94ff1a82ce42223f7a46c9423e99c48e9 Mon Sep 17 00:00:00 2001 From: Felipe Contreras Date: Fri, 24 May 2013 21:29:37 -0500 Subject: [PATCH] remote-hg: add check_bookmark() test helper And check in a more proper way. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- contrib/remote-helpers/test-hg.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/test-hg.sh b/contrib/remote-helpers/test-hg.sh index d244e236f6..4e56640101 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 -- 2.11.4.GIT