# HG changeset patch # User Augie Fackler # Date 2018-09-15 05:13:37 # Node ID 10c53b2e9d52dda60b17fa8d2a2fa4f5be9785d8 # Parent d2c81e83de2ac771943f1793c5f0c4d554c87dc8 phabricator: add tests of templatekeyword Having tests is paying off: I found a bug and now it'll be easy to fix! Differential Revision: https://phab.mercurial-scm.org/D4603 diff --git a/tests/test-phabricator.t b/tests/test-phabricator.t --- a/tests/test-phabricator.t +++ b/tests/test-phabricator.t @@ -64,4 +64,16 @@ Create a differential diff: D4596 - updated - f70265671c65: create alpha for phabricator test D4597 - created - 1a5640df7bbf: create beta for phabricator test saved backup bundle to $TESTTMP/repo/.hg/strip-backup/1a5640df7bbf-6daf3e6e-phabsend.hg + +Template keywords + $ hg log -T'{rev} {phabreview|json}\n' + 1 {"id": "D4597", "url": "https://phab.mercurial-scm.org/D4597"} + 0 {"id": "D4596", "url": "https://phab.mercurial-scm.org/D4596"} + +BUG: this should work, but doesn't. + $ hg log -T'{rev} {phabreview.url}\n' + hg: parse error: {* 'D4597'*} is not a dictionary (glob) + (keyword 'phabreview' does not support member operation) + [255] + $ cd ..