# HG changeset patch # User Pierre-Yves David # Date 1408600376 25200 # 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 -r 10e87c67f1c7 -r d9a8017dce10 tests/test-config.t --- a/tests/test-config.t Tue Aug 19 23:22:44 2014 -0700 +++ b/tests/test-config.t Wed Aug 20 22:52:56 2014 -0700 @@ -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