comparison tests/test-fncache.t @ 35393:4441705b7111

tests: remove (glob) annotations that were only for '\' matches # skip-blame because this was mechanically rewritten the following script. I ran it on both *.t and *.py, but none of the *.py changes were proper. All *.t ones appear to be, and they run without addition failures on both Windows and Linux. import argparse import os import re ap = argparse.ArgumentParser() ap.add_argument('path', nargs='+') opts = ap.parse_args() globre = re.compile(r'^(.*) \(glob\)(.*)$') for p in opts.path: tmp = p + '.tmp' with open(p, 'rb') as src, open(tmp, 'wb') as dst: for line in src: m = globre.match(line) if not m or '$LOCALIP' in line or '*' in line: dst.write(line) continue if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'): dst.write(line) continue dst.write(m.group(1) + m.group(2) + '\n') os.unlink(p) os.rename(tmp, p)
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 10 Dec 2017 22:50:57 -0500
parents 1be228b96030
children 5b5cc44b2cdc
comparison
equal deleted inserted replaced
35392:5feb782c7a95 35393:4441705b7111
12 Testing a.i/b: 12 Testing a.i/b:
13 13
14 $ mkdir a.i 14 $ mkdir a.i
15 $ echo "some other text" > a.i/b 15 $ echo "some other text" > a.i/b
16 $ hg add 16 $ hg add
17 adding a.i/b (glob) 17 adding a.i/b
18 $ hg ci -m second 18 $ hg ci -m second
19 $ cat .hg/store/fncache | sort 19 $ cat .hg/store/fncache | sort
20 data/a.i 20 data/a.i
21 data/a.i.hg/b.i 21 data/a.i.hg/b.i
22 22
23 Testing a.i.hg/c: 23 Testing a.i.hg/c:
24 24
25 $ mkdir a.i.hg 25 $ mkdir a.i.hg
26 $ echo "yet another text" > a.i.hg/c 26 $ echo "yet another text" > a.i.hg/c
27 $ hg add 27 $ hg add
28 adding a.i.hg/c (glob) 28 adding a.i.hg/c
29 $ hg ci -m third 29 $ hg ci -m third
30 $ cat .hg/store/fncache | sort 30 $ cat .hg/store/fncache | sort
31 data/a.i 31 data/a.i
32 data/a.i.hg.hg/c.i 32 data/a.i.hg.hg/c.i
33 data/a.i.hg/b.i 33 data/a.i.hg/b.i