Show More
@@ -1,8 +1,34 b'' | |||||
1 | #require test-repo |
|
1 | #require test-repo | |
2 |
|
2 | |||
3 | $ . "$TESTDIR/helpers-testrepo.sh" |
|
3 | $ . "$TESTDIR/helpers-testrepo.sh" | |
|
4 | ||||
|
5 | Sanity check check-config.py | |||
|
6 | ||||
|
7 | $ cat > testfile.py << EOF | |||
|
8 | > # Good | |||
|
9 | > foo = ui.config('ui', 'username') | |||
|
10 | > # Missing | |||
|
11 | > foo = ui.config('ui', 'doesnotexist') | |||
|
12 | > # Missing different type | |||
|
13 | > foo = ui.configint('ui', 'missingint') | |||
|
14 | > # Missing with default value | |||
|
15 | > foo = ui.configbool('ui', 'missingbool1', default=True) | |||
|
16 | > foo = ui.configbool('ui', 'missingbool2', False) | |||
|
17 | > EOF | |||
|
18 | ||||
|
19 | $ cat > files << EOF | |||
|
20 | > mercurial/help/config.txt | |||
|
21 | > $TESTTMP/testfile.py | |||
|
22 | > EOF | |||
|
23 | ||||
4 |
$ |
|
24 | $ cd "$TESTDIR"/.. | |
5 |
|
25 | |||
|
26 | $ python contrib/check-config.py < $TESTTMP/files | |||
|
27 | undocumented: ui.doesnotexist (str) | |||
|
28 | undocumented: ui.missingbool1 (bool) [True] | |||
|
29 | undocumented: ui.missingbool2 (bool) | |||
|
30 | undocumented: ui.missingint (int) | |||
|
31 | ||||
6 | New errors are not allowed. Warnings are strongly discouraged. |
|
32 | New errors are not allowed. Warnings are strongly discouraged. | |
7 |
|
33 | |||
8 | $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' | |
|
34 | $ hg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' | |
General Comments 0
You need to be logged in to leave comments.
Login now