Mercurial > public > mercurial-scm > hg-stable
diff tests/test-completion.t @ 29954:80fef5251099
config: add template support
V2:
- Limit escaping to plain formatting only
- Use the formatter consistently (no more ui.debug)
- Always include 'name' and 'value'
V3:
- Always convert 'value' to string (this also makes sure we handle functions)
- Keep real debug message as ui.debug for now
- Add additional tests.
Note: I'm not quite sure about the best approach to handling
the 'print the full config' case.
For me, it printed the 'ui.promptecho' key at the end.
I went with globs there as that at least tests the json display reliably.
Example output:
[
{
"name": "ui.username",
"source": "/home/mathias/.hgrc:2",
"value": "Mathias De Mar? <mathias.demare@gmail.com>"
}
]
author | Mathias De Mar? <mathias.demare@gmail.com> |
---|---|
date | Mon, 29 Aug 2016 07:07:15 +0200 |
parents | 45bf56a89197 |
children | eaa5607132a2 |
line wrap: on
line diff
--- a/tests/test-completion.t Mon Aug 29 17:19:09 2016 +0200 +++ b/tests/test-completion.t Mon Aug 29 07:07:15 2016 +0200 @@ -232,7 +232,7 @@ branches: active, closed, template bundle: force, rev, branch, base, all, type, ssh, remotecmd, insecure cat: output, rev, decode, include, exclude - config: untrusted, edit, local, global + config: untrusted, edit, local, global, template copy: after, force, include, exclude, dry-run debugancestor: debugapplystreamclonebundle: