tests/test-branches.t
changeset 32967 13eebc189ff3
parent 31463 a5bad127128d
child 32968 5100ce217dfa
--- a/tests/test-branches.t	Sat Apr 22 21:38:08 2017 +0900
+++ b/tests/test-branches.t	Sat Apr 22 21:46:14 2017 +0900
@@ -530,6 +530,19 @@
   a: Adding b branch head 2
   default: Adding root node
 
+  $ cat <<'EOF' > "$TESTTMP/map-myjson"
+  > docheader = '\{\n'
+  > docfooter = '\n}\n'
+  > branches = '{ifeq(index, 0, "", ",\n")} {dict(branch, node|short)|json}'
+  > EOF
+  $ hg branches -T "$TESTTMP/map-myjson"
+  {
+   {"branch": "b", "node": "e23b5505d1ad"},
+   {"branch": "a branch *", "node": "10ff5895aa57"}, (glob)
+   {"branch": "a", "node": "d8cbc61dbaa6"},
+   {"branch": "default", "node": "19709c5a4e75"}
+  }
+
 Tests of revision branch name caching
 
 We rev branch cache is updated automatically. In these tests we use a trick to