Mercurial > hg
view tests/test-hghave.t @ 28688:3e0d03c3c594
revset: add test that should fail if '_aliasarg' tag is removed
I'm going to refactor the alias processing functions. We need '_aliasarg' tag
to limit the scope of the alias expansion, but it wasn't covered by the test.
This patch adds the test that should fail if '_aliasarg' were 'symbol'.
This is the first half of the second part of the "template alias" series. The
whole series will consist of the following parts:
1. make parsed template tree to be compatible with parser functions
(1d461ee26e1b and 73d01cba5810)
2. refactor alias processing to be less dependent on revset module
(1/2 in this series)
3. extract reusable component to parser module
4. clean up it
5. extend it to support template syntax
6. add debugging/testing functions of template aliases
7. add alias expansion routine to templater
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 14 Feb 2016 21:46:50 +0900 |
parents | 342ab95a1f4b |
children | 5af78c524f34 |
line wrap: on
line source
Testing that hghave does not crash when checking features $ hghave --test-features 2>/dev/null Testing hghave extensibility for third party tools $ cat > hghaveaddon.py <<EOF > import hghave > @hghave.check("custom", "custom hghave feature") > def has_custom(): > return True > EOF (invocation via run-tests.py) $ cat > test-hghaveaddon.t <<EOF > #require custom > $ echo foo > foo > EOF $ run-tests.py $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t . # Ran 1 tests, 0 skipped, 0 warned, 0 failed. (invocation via command line) $ unset TESTDIR $ hghave custom (terminate with exit code 2 at failure of importing hghaveaddon.py) $ rm hghaveaddon.* $ cat > hghaveaddon.py <<EOF > importing this file should cause syntax error > EOF $ hghave custom failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1) [2]