##// END OF EJS Templates
tests: port test-minifileset.py to Python 3...
Augie Fackler -
r37894:2cdae258 default
parent child Browse files
Show More
@@ -256,6 +256,7 b' test-merge6.t'
256 256 test-merge7.t
257 257 test-merge8.t
258 258 test-merge9.t
259 test-minifileset.py
259 260 test-mq-git.t
260 261 test-mq-header-date.t
261 262 test-mq-header-from.t
@@ -18,21 +18,24 b' def check(text, truecases, falsecases):'
18 18 if f(*args):
19 19 print('unexpected: %r should exclude %r' % (text, args))
20 20
21 check('all()', [('a.php', 123), ('b.txt', 0)], [])
22 check('none()', [], [('a.php', 123), ('b.txt', 0)])
23 check('!!!!((!(!!all())))', [], [('a.php', 123), ('b.txt', 0)])
21 check(b'all()', [(b'a.php', 123), (b'b.txt', 0)], [])
22 check(b'none()', [], [(b'a.php', 123), (b'b.txt', 0)])
23 check(b'!!!!((!(!!all())))', [], [(b'a.php', 123), (b'b.txt', 0)])
24 24
25 check('"path:a" & (**.b | **.c)', [('a/b.b', 0), ('a/c.c', 0)], [('b/c.c', 0)])
26 check('(path:a & **.b) | **.c',
27 [('a/b.b', 0), ('a/c.c', 0), ('b/c.c', 0)], [])
25 check(b'"path:a" & (**.b | **.c)',
26 [(b'a/b.b', 0), (b'a/c.c', 0)], [(b'b/c.c', 0)])
27 check(b'(path:a & **.b) | **.c',
28 [(b'a/b.b', 0), (b'a/c.c', 0), (b'b/c.c', 0)], [])
28 29
29 check('**.bin - size("<20B")', [('b.bin', 21)], [('a.bin', 11), ('b.txt', 21)])
30 check(b'**.bin - size("<20B")',
31 [(b'b.bin', 21)], [(b'a.bin', 11), (b'b.txt', 21)])
30 32
31 check('!!**.bin or size(">20B") + "path:bin" or !size(">10")',
32 [('a.bin', 11), ('b.txt', 21), ('bin/abc', 11)],
33 [('a.notbin', 11), ('b.txt', 11), ('bin2/abc', 11)])
33 check(b'!!**.bin or size(">20B") + "path:bin" or !size(">10")',
34 [(b'a.bin', 11), (b'b.txt', 21), (b'bin/abc', 11)],
35 [(b'a.notbin', 11), (b'b.txt', 11), (b'bin2/abc', 11)])
34 36
35 check('(**.php and size(">10KB")) | **.zip | ("path:bin" & !"path:bin/README") '
36 ' | size(">1M")',
37 [('a.php', 15000), ('a.zip', 0), ('bin/a', 0), ('bin/README', 1e7)],
38 [('a.php', 5000), ('b.zip2', 0), ('t/bin/a', 0), ('bin/README', 1)])
37 check(
38 b'(**.php and size(">10KB")) | **.zip | ("path:bin" & !"path:bin/README") '
39 b' | size(">1M")',
40 [(b'a.php', 15000), (b'a.zip', 0), (b'bin/a', 0), (b'bin/README', 1e7)],
41 [(b'a.php', 5000), (b'b.zip2', 0), (b't/bin/a', 0), (b'bin/README', 1)])
General Comments 0
You need to be logged in to leave comments. Login now