From patchwork Thu Aug 21 06:13:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,2] test-config: add tests from invalid syntax From: Pierre-Yves David X-Patchwork-Id: 5545 Message-Id: To: mercurial-devel@selenic.com Cc: Pierre-Yves David Date: Wed, 20 Aug 2014 23:13:42 -0700 # HG changeset patch # User Pierre-Yves David # Date 1408600376 25200 # Wed Aug 20 22:52:56 2014 -0700 # Node ID b09526f454bd930d851963bda21227f9932bccf8 # Parent 8bf85b30fd02d25d5b140f7d2ab3f89f8af89d7a test-config: add tests from invalid syntax That 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,8 +1,30 @@ 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 $ echo 'KeY = Case Sensitive' >> $HGRCPATH $ echo 'key = lower case' >> $HGRCPATH