##// END OF EJS Templates
tests: use test harness `hg` in test-hghave.t...
Gregory Szorc -
r43275:7eac24de default
parent child Browse files
Show More
@@ -1,46 +1,46 b''
1 1 $ . "$TESTDIR/helpers-testrepo.sh"
2 2
3 3 Testing that hghave does not crash when checking features
4 4
5 5 $ hghave --test-features 2>/dev/null
6 6
7 7 Testing hghave extensibility for third party tools
8 8
9 9 $ cat > hghaveaddon.py <<EOF
10 10 > import hghave
11 11 > @hghave.check("custom", "custom hghave feature")
12 12 > def has_custom():
13 13 > return True
14 14 > EOF
15 15
16 16 (invocation via run-tests.py)
17 17
18 18 $ cat > test-hghaveaddon.t <<EOF
19 19 > #require custom
20 20 > $ echo foo
21 21 > foo
22 22 > EOF
23 23 $ ( \
24 24 > testrepohgenv; \
25 > "$PYTHON" $TESTDIR/run-tests.py -j 1 \
25 > "$PYTHON" $TESTDIR/run-tests.py --with-hg=`which hg` -j 1 \
26 26 > $HGTEST_RUN_TESTS_PURE test-hghaveaddon.t \
27 27 > )
28 28 running 1 tests using 1 parallel processes
29 29 .
30 30 # Ran 1 tests, 0 skipped, 0 failed.
31 31
32 32 (invocation via command line)
33 33
34 34 $ unset TESTDIR
35 35 $ hghave custom
36 36
37 37 (terminate with exit code 2 at failure of importing hghaveaddon.py)
38 38
39 39 $ rm hghaveaddon.*
40 40 $ cat > hghaveaddon.py <<NO_CHECK_EOF
41 41 > importing this file should cause syntax error
42 42 > NO_CHECK_EOF
43 43
44 44 $ hghave custom
45 45 failed to import hghaveaddon.py from '.': invalid syntax (hghaveaddon.py, line 1)
46 46 [2]
General Comments 0
You need to be logged in to leave comments. Login now