Mercurial > hg
comparison tests/test-hgrc.t @ 12366:c01dc9087d9a
tests: drop a bunch of sed calls from unified tests
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 21 Sep 2010 16:44:13 -0500 |
parents | 51272b65b9b7 |
children | 5163e3c8aa52 |
comparison
equal
deleted
inserted
replaced
12365:22f3353bcc36 | 12366:c01dc9087d9a |
---|---|
1 $ echo "invalid" > $HGRCPATH | 1 $ echo "invalid" > $HGRCPATH |
2 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | 2 $ hg version |
3 hg: parse error at $HGRCPATH:1: invalid | 3 hg: parse error at .*/\.hgrc:1: invalid |
4 [255] | |
4 $ echo "" > $HGRCPATH | 5 $ echo "" > $HGRCPATH |
5 | 6 |
6 issue1199: escaping | 7 issue1199: escaping |
7 | 8 |
8 $ hg init "foo%bar" | 9 $ hg init "foo%bar" |
9 $ hg clone "foo%bar" foobar | 10 $ hg clone "foo%bar" foobar |
10 updating to branch default | 11 updating to branch default |
11 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 12 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
12 $ p=`pwd` | 13 $ p=`pwd` |
13 $ cd foobar | 14 $ cd foobar |
14 $ cat .hg/hgrc | sed -e "s:$p:...:" | 15 $ cat .hg/hgrc |
15 [paths] | 16 [paths] |
16 default = .../foo%bar | 17 default = .*/foo%bar |
17 $ hg paths | sed -e "s:$p:...:" | 18 $ hg paths |
18 default = .../foo%bar | 19 default = .*/foo%bar |
19 $ hg showconfig | sed -e "s:$p:...:" | 20 $ hg showconfig |
20 bundle.mainreporoot=.../foobar | 21 bundle.mainreporoot=.*/foobar |
21 paths.default=.../foo%bar | 22 paths.default=.*/foo%bar |
22 $ cd .. | 23 $ cd .. |
23 | 24 |
24 issue1829: wrong indentation | 25 issue1829: wrong indentation |
25 | 26 |
26 $ echo '[foo]' > $HGRCPATH | 27 $ echo '[foo]' > $HGRCPATH |
27 $ echo ' x = y' >> $HGRCPATH | 28 $ echo ' x = y' >> $HGRCPATH |
28 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | 29 $ hg version |
29 hg: parse error at $HGRCPATH:2: x = y | 30 hg: parse error at .*/\.hgrc:2: x = y |
31 [255] | |
30 | 32 |
31 $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ | 33 $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \ |
32 > > $HGRCPATH | 34 > > $HGRCPATH |
33 $ hg showconfig foo | 35 $ hg showconfig foo |
34 foo.bar=a\nb\nc\nde\nfg | 36 foo.bar=a\nb\nc\nde\nfg |
35 foo.baz=bif cb | 37 foo.baz=bif cb |
36 | 38 |
37 $ FAKEPATH=/path/to/nowhere | 39 $ FAKEPATH=/path/to/nowhere |
38 $ export FAKEPATH | 40 $ export FAKEPATH |
39 $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH | 41 $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH |
40 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|" | 42 $ hg version |
41 hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory) | 43 hg: parse error at .*/.hgrc:1: cannot include /path/to/nowhere/no-such-file \(No such file or directory\) |
44 [255] | |
42 $ unset FAKEPATH | 45 $ unset FAKEPATH |
43 | 46 |
44 username expansion | 47 username expansion |
45 | 48 |
46 $ olduser=$HGUSER | 49 $ olduser=$HGUSER |
84 $ echo "[alias]" >> $HGRCPATH | 87 $ echo "[alias]" >> $HGRCPATH |
85 $ echo "log=log -g" >> $HGRCPATH | 88 $ echo "log=log -g" >> $HGRCPATH |
86 | 89 |
87 customized hgrc | 90 customized hgrc |
88 | 91 |
89 $ hg showconfig | sed -e "s:$p:...:" | 92 $ hg showconfig |
90 read config from: .../.hgrc | 93 read config from: .*/.hgrc |
91 .../.hgrc:13: alias.log=log -g | 94 .*/.hgrc:13: alias.log=log -g |
92 .../.hgrc:11: defaults.identify=-n | 95 .*/.hgrc:11: defaults.identify=-n |
93 .../.hgrc:2: ui.debug=true | 96 .*/.hgrc:2: ui.debug=true |
94 .../.hgrc:3: ui.fallbackencoding=ASCII | 97 .*/.hgrc:3: ui.fallbackencoding=ASCII |
95 .../.hgrc:4: ui.quiet=true | 98 .*/.hgrc:4: ui.quiet=true |
96 .../.hgrc:5: ui.slash=true | 99 .*/.hgrc:5: ui.slash=true |
97 .../.hgrc:6: ui.traceback=true | 100 .*/.hgrc:6: ui.traceback=true |
98 .../.hgrc:7: ui.verbose=true | 101 .*/.hgrc:7: ui.verbose=true |
99 .../.hgrc:8: ui.style=~/.hgstyle | 102 .*/.hgrc:8: ui.style=~/.hgstyle |
100 .../.hgrc:9: ui.logtemplate={node} | 103 .*/.hgrc:9: ui.logtemplate={node} |
101 | 104 |
102 plain hgrc | 105 plain hgrc |
103 | 106 |
104 $ HGPLAIN=; export HGPLAIN | 107 $ HGPLAIN=; export HGPLAIN |
105 $ hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:" | 108 $ hg showconfig --config ui.traceback=True --debug |
106 read config from: .../.hgrc | 109 read config from: .*/.hgrc |
107 none: ui.traceback=True | 110 none: ui.traceback=True |
108 none: ui.verbose=False | 111 none: ui.verbose=False |
109 none: ui.debug=True | 112 none: ui.debug=True |
110 none: ui.quiet=False | 113 none: ui.quiet=False |