--- a/tests/test-config.t Sun Mar 26 21:27:02 2017 -0700
+++ b/tests/test-config.t Sun Mar 26 21:33:37 2017 -0700
@@ -164,3 +164,17 @@
$ HGEDITOR=false hg config --edit
abort: edit failed: false exited with status 1
[255]
+
+config affected by environment variables
+
+ $ EDITOR=e1 VISUAL=e2 hg config --debug | grep 'ui\.editor'
+ $VISUAL: ui.editor=e2
+
+ $ VISUAL=e2 hg config --debug --config ui.editor=e3 | grep 'ui\.editor'
+ --config: ui.editor=e3
+
+ $ PAGER=p1 hg config --debug | grep 'pager\.pager'
+ $PAGER: pager.pager=p1
+
+ $ PAGER=p1 hg config --debug --config pager.pager=p2 | grep 'pager\.pager'
+ --config: pager.pager=p2