# HG changeset patch # User Pierre-Yves David # Date 2014-08-21 05:52:56 # Node ID d9a8017dce10ad7c2b74d3e907f52dfefc23e3c2 # Parent 10e87c67f1c746ef4faf1962cf5bdb3dcda1d874 test-config: add tests for invalid syntax This was not tested and there is more to come in the next patch. diff --git a/tests/test-config.t b/tests/test-config.t --- a/tests/test-config.t +++ b/tests/test-config.t @@ -1,6 +1,28 @@ hide outer repo $ hg init +Invalid syntax: no value + + $ cat > .hg/hgrc << EOF + > novaluekey + > EOF + $ hg showconfig + hg: parse error at $TESTTMP/.hg/hgrc:1: novaluekey + [255] + +Invalid syntax: no key + + $ cat > .hg/hgrc << EOF + > =nokeyvalue + > EOF + $ hg showconfig + hg: parse error at $TESTTMP/.hg/hgrc:1: =nokeyvalue + [255] + +Reset hgrc + + $ echo > .hg/hgrc + Test case sensitive configuration $ echo '[Section]' >> $HGRCPATH