Mercurial > hg
diff tests/test-committer.t @ 32316:7340465bd788
run-tests: support multiple cases in .t test
Sometimes we want to run similar tests with slightly different
configurations. Previously we duplicate the test files. This patch
introduces special "#testcases" syntax that allows a single .t file to
contain multiple test cases.
Defined cases could be tested using "#if".
For example, if a test should behave the same with or without an
experimental flag, we can add the following to the .t header:
#testcases default experimental-a
#if experimental-a
$ cat >> $HGRCPATH << EOF
> [experimental]
> feature=a
> EOF
#endif
The "experimental-a" block won't be executed when running the "default" test
case.
author | Jun Wu <quark@fb.com> |
---|---|
date | Tue, 16 May 2017 23:10:31 -0700 |
parents | ad2cd2ef25d9 |
children | 95c4cca641f6 |