Mercurial > hg
comparison tests/test-check-help.t @ 40091:c36846abbcd3
tests: import multiple modules separately
Current import-checker.py overlooks code fragment changed in this
patch, because of restrictions below for a line starting code
fragment.
- filename must be specified before limit mark
NG: cat <<EOF > FILE.py
OK: cat > FILE.py <<EOF
- limit mark must not be quoted
NG: cat > FILE.py <<'EOF'
OK: cat > FILE.py <<EOF
import-checker.py itself is fixed in subsequent patch.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 23 Aug 2018 12:20:41 +0900 |
parents | 5abc47d4ca6b |
children | b6c610bf567e |
comparison
equal
deleted
inserted
replaced
40090:a66594c5fad4 | 40091:c36846abbcd3 |
---|---|
5 $ cat <<'EOF' > scanhelptopics.py | 5 $ cat <<'EOF' > scanhelptopics.py |
6 > from __future__ import absolute_import, print_function | 6 > from __future__ import absolute_import, print_function |
7 > import re | 7 > import re |
8 > import sys | 8 > import sys |
9 > if sys.platform == "win32": | 9 > if sys.platform == "win32": |
10 > import os, msvcrt | 10 > import msvcrt |
11 > import os | |
11 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) | 12 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) |
12 > topics = set() | 13 > topics = set() |
13 > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`') | 14 > topicre = re.compile(br':hg:`help ([a-z0-9\-.]+)`') |
14 > for fname in sys.argv: | 15 > for fname in sys.argv: |
15 > with open(fname, 'rb') as f: | 16 > with open(fname, 'rb') as f: |