tests/test-config.t
changeset 23348 bbe56e07e07a
parent 23172 e955549cd045
child 29412 b62bce819d0c
equal deleted inserted replaced
23347:49cdf51cbc6c 23348:bbe56e07e07a
     5 
     5 
     6   $ cat > .hg/hgrc << EOF
     6   $ cat > .hg/hgrc << EOF
     7   > novaluekey
     7   > novaluekey
     8   > EOF
     8   > EOF
     9   $ hg showconfig
     9   $ hg showconfig
    10   hg: parse error at $TESTTMP/.hg/hgrc:1: novaluekey
    10   hg: parse error at $TESTTMP/.hg/hgrc:1: novaluekey (glob)
    11   [255]
    11   [255]
    12 
    12 
    13 Invalid syntax: no key
    13 Invalid syntax: no key
    14 
    14 
    15   $ cat > .hg/hgrc << EOF
    15   $ cat > .hg/hgrc << EOF
    16   > =nokeyvalue
    16   > =nokeyvalue
    17   > EOF
    17   > EOF
    18   $ hg showconfig
    18   $ hg showconfig
    19   hg: parse error at $TESTTMP/.hg/hgrc:1: =nokeyvalue
    19   hg: parse error at $TESTTMP/.hg/hgrc:1: =nokeyvalue (glob)
    20   [255]
    20   [255]
    21 
    21 
    22 Test hint about invalid syntax from leading white space
    22 Test hint about invalid syntax from leading white space
    23 
    23 
    24   $ cat > .hg/hgrc << EOF
    24   $ cat > .hg/hgrc << EOF
    25   >  key=value
    25   >  key=value
    26   > EOF
    26   > EOF
    27   $ hg showconfig
    27   $ hg showconfig
    28   hg: parse error at $TESTTMP/.hg/hgrc:1:  key=value
    28   hg: parse error at $TESTTMP/.hg/hgrc:1:  key=value (glob)
    29   unexpected leading whitespace
    29   unexpected leading whitespace
    30   [255]
    30   [255]
    31 
    31 
    32   $ cat > .hg/hgrc << EOF
    32   $ cat > .hg/hgrc << EOF
    33   >  [section]
    33   >  [section]
    34   > key=value
    34   > key=value
    35   > EOF
    35   > EOF
    36   $ hg showconfig
    36   $ hg showconfig
    37   hg: parse error at $TESTTMP/.hg/hgrc:1:  [section]
    37   hg: parse error at $TESTTMP/.hg/hgrc:1:  [section] (glob)
    38   unexpected leading whitespace
    38   unexpected leading whitespace
    39   [255]
    39   [255]
    40 
    40 
    41 Reset hgrc
    41 Reset hgrc
    42 
    42