##// END OF EJS Templates
tests: use pattern matching to mask `ECONNREFUSED` messages...
tests: use pattern matching to mask `ECONNREFUSED` messages The second and third one of these in `test-http-proxy.t` was failing on Windows. The others were found by grep and by failed tests when output was matched and an attempt was made to emit the mask pattern. The first clonebundles failure on Windows emitted: error fetching bundle: [WinError 10061] $ECONNREFUSED$ We should probably stringify that better to get rid of the "[WinError 10061]" part.

File last commit:

r44031:2e017696 default
r52835:73a43fe3 default
Show More
test-check-config.t
47 lines | 1.5 KiB | text/troff | Tads3Lexer
/ tests / test-check-config.t
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 #require test-repo
timeless
tests: silence test-repo obsolete warning...
r29219 $ . "$TESTDIR/helpers-testrepo.sh"
Gregory Szorc
tests: add test coverage for check-config...
r32846
Sanity check check-config.py
$ cat > testfile.py << EOF
> # Good
> foo = ui.config('ui', 'username')
> # Missing
> foo = ui.config('ui', 'doesnotexist')
> # Missing different type
> foo = ui.configint('ui', 'missingint')
> # Missing with default value
> foo = ui.configbool('ui', 'missingbool1', default=True)
> foo = ui.configbool('ui', 'missingbool2', False)
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 > # Inconsistent values for defaults.
> foo = ui.configint('ui', 'intdefault', default=1)
> foo = ui.configint('ui', 'intdefault', default=42)
> # Can suppress inconsistent value error
> foo = ui.configint('ui', 'intdefault2', default=1)
> # inconsistent config: ui.intdefault2
> foo = ui.configint('ui', 'intdefault2', default=42)
Gregory Szorc
tests: add test coverage for check-config...
r32846 > EOF
$ cat > files << EOF
Matt Harbison
help: create packages for the help text...
r44031 > mercurial/helptext/config.txt
Gregory Szorc
tests: add test coverage for check-config...
r32846 > $TESTTMP/testfile.py
> EOF
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 $ cd "$TESTDIR"/..
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" contrib/check-config.py < $TESTTMP/files
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 foo = ui.configint('ui', 'intdefault', default=42)
conflict on ui.intdefault: ('int', '42') != ('int', '1')
Matt Harbison
tests: remove (glob) annotations that were only for '\' matches...
r35394 at $TESTTMP/testfile.py:12:
Gregory Szorc
tests: add test coverage for check-config...
r32846 undocumented: ui.doesnotexist (str)
Gregory Szorc
check-config: syntax to allow inconsistent config values...
r33192 undocumented: ui.intdefault (int) [42]
undocumented: ui.intdefault2 (int) [42]
Gregory Szorc
tests: add test coverage for check-config...
r32846 undocumented: ui.missingbool1 (bool) [True]
undocumented: ui.missingbool2 (bool)
undocumented: ui.missingint (int)
Pierre-Yves David
tests: move the '-hg' postfix for all style tests...
r27368 New errors are not allowed. Warnings are strongly discouraged.
Yuya Nishihara
tests: alias syshg and syshgenv so they can be switched conditionally
r33199 $ testrepohg files "set:(**.py or **.txt) - tests/**" | sed 's|\\|/|g' |
Matt Harbison
tests: quote PYTHON usage...
r39743 > "$PYTHON" contrib/check-config.py