##// END OF EJS Templates
tests: update test-patchbomb to pass our import checker
Augie Fackler -
r33985:99e3227c default
parent child Browse files
Show More
@@ -9,18 +9,19 b' Mercurial-patchbomb/.* -> Mercurial-patc'
9 --===+[0-9]+=+$ -> --===*= (glob)
9 --===+[0-9]+=+$ -> --===*= (glob)
10
10
11 $ cat > prune-blank-after-boundary.py <<EOF
11 $ cat > prune-blank-after-boundary.py <<EOF
12 > from __future__ import absolute_import, print_function
12 > import sys
13 > import sys
13 > skipblank = False
14 > skipblank = False
14 > trim = lambda x: x.strip(' \r\n')
15 > trim = lambda x: x.strip(' \r\n')
15 > for l in sys.stdin:
16 > for l in sys.stdin:
16 > if trim(l).endswith('=--') or trim(l).endswith('=='):
17 > if trim(l).endswith('=--') or trim(l).endswith('=='):
17 > skipblank = True
18 > skipblank = True
18 > print l,
19 > print(l, end='')
19 > continue
20 > continue
20 > if not trim(l) and skipblank:
21 > if not trim(l) and skipblank:
21 > continue
22 > continue
22 > skipblank = False
23 > skipblank = False
23 > print l,
24 > print(l, end='')
24 > EOF
25 > EOF
25 $ FILTERBOUNDARY="$PYTHON `pwd`/prune-blank-after-boundary.py"
26 $ FILTERBOUNDARY="$PYTHON `pwd`/prune-blank-after-boundary.py"
26 $ echo "[format]" >> $HGRCPATH
27 $ echo "[format]" >> $HGRCPATH
General Comments 0
You need to be logged in to leave comments. Login now