# HG changeset patch # User Simon Heimberg # Date 1360789132 -3600 # Node ID 62ff53b057302f470aaa5d2c06eb910253497958 # Parent 82697301ffa2bc29562716b642d27230090e9611 tests: quickly check if the glob line already matches the output This happens when a path with "/" as only glob char is matched on a non windows platform. (Currently one third of all glob matches.) The slowdown on windows and the speedup on other os are neglectable. [ original upstream message ] diff -r 82697301ffa2 -r 62ff53b05730 tests/run-tests.py --- a/tests/run-tests.py Fri Feb 08 22:54:17 2013 +0100 +++ b/tests/run-tests.py Wed Feb 13 21:58:52 2013 +0100 @@ -541,6 +541,8 @@ def globmatch(el, l): # The only supported special characters are * and ? plus / which also # matches \ on windows. Escaping of these caracters is supported. + if el + '\n' == l: + return True i, n = 0, len(el) res = '' while i < n: