##// END OF EJS Templates
tests: confirm that a badly documented extension doesn't cause a crash...
Simon Farnsworth -
r28083:550097d0 default
parent child Browse files
Show More
@@ -1,11 +1,19 b''
1 $ echo 'raise Exception("bit bucket overflow")' > badext.py
1 $ echo 'raise Exception("bit bucket overflow")' > badext.py
2 $ abspath=`pwd`/badext.py
2 $ abspathexc=`pwd`/badext.py
3
4 $ cat >baddocext.py <<EOF
5 > """
6 > baddocext is bad
7 > """
8 > EOF
9 $ abspathdoc=`pwd`/baddocext.py
3
10
4 $ cat <<EOF >> $HGRCPATH
11 $ cat <<EOF >> $HGRCPATH
5 > [extensions]
12 > [extensions]
6 > gpg =
13 > gpg =
7 > hgext.gpg =
14 > hgext.gpg =
8 > badext = $abspath
15 > badext = $abspathexc
16 > baddocext = $abspathdoc
9 > badext2 =
17 > badext2 =
10 > EOF
18 > EOF
11
19
@@ -38,3 +46,12 b' show traceback for ImportError of hgext.'
38 *** failed to import extension badext2: No module named badext2
46 *** failed to import extension badext2: No module named badext2
39 Traceback (most recent call last):
47 Traceback (most recent call last):
40 ImportError: No module named badext2
48 ImportError: No module named badext2
49
50 confirm that there's no crash when an extension's documentation is bad
51
52 $ hg help --keyword baddocext
53 *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow
54 *** failed to import extension badext2: No module named badext2
55 Topics:
56
57 extensions Using Additional Features
General Comments 0
You need to be logged in to leave comments. Login now