tests/test-config.t
changeset 30618 201b44c8875c
parent 29950 80fef5251099
child 30986 f07ca071a058
--- 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