Mercurial > public > mercurial-scm > hg
diff tests/test-config.t @ 30618:201b44c8875c
ui: do not translate empty configsource() to 'none' (API)
It should be processed when displaying data, so we can get "source": "" in
JSON output.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 23 Oct 2016 17:47:00 +0900 |
parents | 80fef5251099 |
children | f07ca071a058 |
line wrap: on
line diff
--- a/tests/test-config.t Sun Dec 18 16:20:04 2016 +0900 +++ b/tests/test-config.t Sun Oct 23 17:47:00 2016 +0900 @@ -84,6 +84,32 @@ } ] +Test empty config source: + + $ cat <<EOF > emptysource.py + > def reposetup(ui, repo): + > ui.setconfig('empty', 'source', 'value') + > EOF + $ cp .hg/hgrc .hg/hgrc.orig + $ cat <<EOF >> .hg/hgrc + > [extensions] + > emptysource = `pwd`/emptysource.py + > EOF + + $ hg config --debug empty.source + read config from: * (glob) + none: value + $ hg config empty.source -Tjson + [ + { + "name": "empty.source", + "source": "", + "value": "value" + } + ] + + $ cp .hg/hgrc.orig .hg/hgrc + Test "%unset" $ cat >> $HGRCPATH <<EOF