Mercurial > hg
diff tests/test-devel-warnings.t @ 34858:85a2db47ad50
configitems: adds a developer warning when accessing undeclared configuration
Now that all known options are declared, we setup a warning to make sure it will
stay this way.
We disable the warning in two tests checking other behavior with random options.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 16 Oct 2017 17:41:27 +0200 |
parents | b0910102e495 |
children | ff2110eadbfa |
line wrap: on
line diff
--- a/tests/test-devel-warnings.t Tue Oct 17 21:15:31 2017 +0200 +++ b/tests/test-devel-warnings.t Mon Oct 16 17:41:27 2017 +0200 @@ -363,6 +363,8 @@ > repo.ui.config('test', 'some', 'foo') > repo.ui.config('test', 'dynamic', 'some-required-default') > repo.ui.config('test', 'dynamic') + > repo.ui.config('test', 'unregistered') + > repo.ui.config('unregistered', 'unregistered') > EOF $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig @@ -372,5 +374,7 @@ devel-warn: specifying a default value for a registered config item: 'ui.interactive' 'None' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: specifying a default value for a registered config item: 'test.some' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: config item requires an explicit default value: 'test.dynamic' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) + devel-warn: accessing unregistered config item: 'test.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) + devel-warn: accessing unregistered config item: 'unregistered.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) $ cd ..