##// END OF EJS Templates
tests: remove useless sed in test-hgrc
Nicolas Dumazet -
r12109:51272b65 default
parent child Browse files
Show More
@@ -1,110 +1,110 b''
1 $ echo "invalid" > $HGRCPATH
1 $ echo "invalid" > $HGRCPATH
2 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
2 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
3 hg: parse error at $HGRCPATH:1: invalid
3 hg: parse error at $HGRCPATH:1: invalid
4 $ echo "" > $HGRCPATH
4 $ echo "" > $HGRCPATH
5
5
6 issue1199: escaping
6 issue1199: escaping
7
7
8 $ hg init "foo%bar"
8 $ hg init "foo%bar"
9 $ hg clone "foo%bar" foobar
9 $ hg clone "foo%bar" foobar
10 updating to branch default
10 updating to branch default
11 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 $ p=`pwd`
12 $ p=`pwd`
13 $ cd foobar
13 $ cd foobar
14 $ cat .hg/hgrc | sed -e "s:$p:...:"
14 $ cat .hg/hgrc | sed -e "s:$p:...:"
15 [paths]
15 [paths]
16 default = .../foo%bar
16 default = .../foo%bar
17 $ hg paths | sed -e "s:$p:...:"
17 $ hg paths | sed -e "s:$p:...:"
18 default = .../foo%bar
18 default = .../foo%bar
19 $ hg showconfig | sed -e "s:$p:...:"
19 $ hg showconfig | sed -e "s:$p:...:"
20 bundle.mainreporoot=.../foobar
20 bundle.mainreporoot=.../foobar
21 paths.default=.../foo%bar
21 paths.default=.../foo%bar
22 $ cd ..
22 $ cd ..
23
23
24 issue1829: wrong indentation
24 issue1829: wrong indentation
25
25
26 $ echo '[foo]' > $HGRCPATH
26 $ echo '[foo]' > $HGRCPATH
27 $ echo ' x = y' >> $HGRCPATH
27 $ echo ' x = y' >> $HGRCPATH
28 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
28 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
29 hg: parse error at $HGRCPATH:2: x = y
29 hg: parse error at $HGRCPATH:2: x = y
30
30
31 $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \
31 $ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \
32 > > $HGRCPATH
32 > > $HGRCPATH
33 $ hg showconfig foo
33 $ hg showconfig foo
34 foo.bar=a\nb\nc\nde\nfg
34 foo.bar=a\nb\nc\nde\nfg
35 foo.baz=bif cb
35 foo.baz=bif cb
36
36
37 $ FAKEPATH=/path/to/nowhere
37 $ FAKEPATH=/path/to/nowhere
38 $ export FAKEPATH
38 $ export FAKEPATH
39 $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
39 $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
40 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
40 $ hg version 2>&1 | sed -e "s|$HGRCPATH|\$HGRCPATH|"
41 hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
41 hg: parse error at $HGRCPATH:1: cannot include /path/to/nowhere/no-such-file (No such file or directory)
42 $ unset FAKEPATH
42 $ unset FAKEPATH
43
43
44 username expansion
44 username expansion
45
45
46 $ olduser=$HGUSER
46 $ olduser=$HGUSER
47 $ unset HGUSER
47 $ unset HGUSER
48
48
49 $ FAKEUSER='John Doe'
49 $ FAKEUSER='John Doe'
50 $ export FAKEUSER
50 $ export FAKEUSER
51 $ echo '[ui]' > $HGRCPATH
51 $ echo '[ui]' > $HGRCPATH
52 $ echo 'username = $FAKEUSER' >> $HGRCPATH
52 $ echo 'username = $FAKEUSER' >> $HGRCPATH
53
53
54 $ hg init usertest
54 $ hg init usertest
55 $ cd usertest
55 $ cd usertest
56 $ touch bar
56 $ touch bar
57 $ hg commit --addremove --quiet -m "added bar"
57 $ hg commit --addremove --quiet -m "added bar"
58 $ hg log --template "{author}\n"
58 $ hg log --template "{author}\n"
59 John Doe
59 John Doe
60 $ cd ..
60 $ cd ..
61
61
62 $ hg showconfig | sed -e "s:$p:...:"
62 $ hg showconfig
63 ui.username=$FAKEUSER
63 ui.username=$FAKEUSER
64
64
65 $ unset FAKEUSER
65 $ unset FAKEUSER
66 $ HGUSER=$olduser
66 $ HGUSER=$olduser
67 $ export HGUSER
67 $ export HGUSER
68
68
69 HGPLAIN
69 HGPLAIN
70
70
71 $ cd ..
71 $ cd ..
72 $ p=`pwd`
72 $ p=`pwd`
73 $ echo "[ui]" > $HGRCPATH
73 $ echo "[ui]" > $HGRCPATH
74 $ echo "debug=true" >> $HGRCPATH
74 $ echo "debug=true" >> $HGRCPATH
75 $ echo "fallbackencoding=ASCII" >> $HGRCPATH
75 $ echo "fallbackencoding=ASCII" >> $HGRCPATH
76 $ echo "quiet=true" >> $HGRCPATH
76 $ echo "quiet=true" >> $HGRCPATH
77 $ echo "slash=true" >> $HGRCPATH
77 $ echo "slash=true" >> $HGRCPATH
78 $ echo "traceback=true" >> $HGRCPATH
78 $ echo "traceback=true" >> $HGRCPATH
79 $ echo "verbose=true" >> $HGRCPATH
79 $ echo "verbose=true" >> $HGRCPATH
80 $ echo "style=~/.hgstyle" >> $HGRCPATH
80 $ echo "style=~/.hgstyle" >> $HGRCPATH
81 $ echo "logtemplate={node}" >> $HGRCPATH
81 $ echo "logtemplate={node}" >> $HGRCPATH
82 $ echo "[defaults]" >> $HGRCPATH
82 $ echo "[defaults]" >> $HGRCPATH
83 $ echo "identify=-n" >> $HGRCPATH
83 $ echo "identify=-n" >> $HGRCPATH
84 $ echo "[alias]" >> $HGRCPATH
84 $ echo "[alias]" >> $HGRCPATH
85 $ echo "log=log -g" >> $HGRCPATH
85 $ echo "log=log -g" >> $HGRCPATH
86
86
87 customized hgrc
87 customized hgrc
88
88
89 $ hg showconfig | sed -e "s:$p:...:"
89 $ hg showconfig | sed -e "s:$p:...:"
90 read config from: .../.hgrc
90 read config from: .../.hgrc
91 .../.hgrc:13: alias.log=log -g
91 .../.hgrc:13: alias.log=log -g
92 .../.hgrc:11: defaults.identify=-n
92 .../.hgrc:11: defaults.identify=-n
93 .../.hgrc:2: ui.debug=true
93 .../.hgrc:2: ui.debug=true
94 .../.hgrc:3: ui.fallbackencoding=ASCII
94 .../.hgrc:3: ui.fallbackencoding=ASCII
95 .../.hgrc:4: ui.quiet=true
95 .../.hgrc:4: ui.quiet=true
96 .../.hgrc:5: ui.slash=true
96 .../.hgrc:5: ui.slash=true
97 .../.hgrc:6: ui.traceback=true
97 .../.hgrc:6: ui.traceback=true
98 .../.hgrc:7: ui.verbose=true
98 .../.hgrc:7: ui.verbose=true
99 .../.hgrc:8: ui.style=~/.hgstyle
99 .../.hgrc:8: ui.style=~/.hgstyle
100 .../.hgrc:9: ui.logtemplate={node}
100 .../.hgrc:9: ui.logtemplate={node}
101
101
102 plain hgrc
102 plain hgrc
103
103
104 $ HGPLAIN=; export HGPLAIN
104 $ HGPLAIN=; export HGPLAIN
105 $ hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"
105 $ hg showconfig --config ui.traceback=True --debug | sed -e "s:$p:...:"
106 read config from: .../.hgrc
106 read config from: .../.hgrc
107 none: ui.traceback=True
107 none: ui.traceback=True
108 none: ui.verbose=False
108 none: ui.verbose=False
109 none: ui.debug=True
109 none: ui.debug=True
110 none: ui.quiet=False
110 none: ui.quiet=False
General Comments 0
You need to be logged in to leave comments. Login now