tests/test-check-help.t
changeset 35947 a36d3c8a0e41
parent 33204 ddd65b4f3ae6
child 35949 80e5210df25c
equal deleted inserted replaced
35946:cf887d601014 35947:a36d3c8a0e41
     8   > import sys
     8   > import sys
     9   > if sys.platform == "win32":
     9   > if sys.platform == "win32":
    10   >     import os, msvcrt
    10   >     import os, msvcrt
    11   >     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
    11   >     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
    12   > topics = set()
    12   > topics = set()
    13   > topicre = re.compile(r':hg:`help ([a-z0-9\-.]+)`')
    13   > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`')
    14   > for fname in sys.argv:
    14   > for fname in sys.argv:
    15   >     with open(fname) as f:
    15   >     with open(fname) as f:
    16   >         topics.update(m.group(1) for m in topicre.finditer(f.read()))
    16   >         topics.update(m.group(1) for m in topicre.finditer(f.read()))
    17   > for s in sorted(topics):
    17   > for s in sorted(topics):
    18   >     print(s)
    18   >     print(s)