##// END OF EJS Templates
help: test if "hg help TOPIC" reference is valid...
Yuya Nishihara -
r30880:b6c051cd default
parent child Browse files
Show More
@@ -0,0 +1,25 b''
1 #require test-repo
2
3 $ . "$TESTDIR/helpers-testrepo.sh"
4
5 $ cat <<'EOF' > scanhelptopics.py
6 > from __future__ import absolute_import, print_function
7 > import re
8 > import sys
9 > topics = set()
10 > topicre = re.compile(r':hg:`help ([a-z0-9\-.]+)`')
11 > for fname in sys.argv:
12 > with open(fname) as f:
13 > topics.update(m.group(1) for m in topicre.finditer(f.read()))
14 > for s in sorted(topics):
15 > print(s)
16 > EOF
17
18 $ cd "$TESTDIR"/..
19
20 Check if ":hg:`help TOPIC`" is valid:
21 (use "xargs -n1 -t" to see which help commands are executed)
22
23 $ hg files 'glob:{hgext,mercurial}/**/*.py' \
24 > | xargs python "$TESTTMP/scanhelptopics.py" \
25 > | xargs -n1 hg help > /dev/null
General Comments 0
You need to be logged in to leave comments. Login now