# HG changeset patch # User Simon Heimberg # Date 2013-02-13 20:58:52 # Node ID 15711d9d8b2caebf97d36f54417cd237f1154d93 # Parent 423eee0b0b14086173f3adf423e512b1f9f75053 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. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -541,6 +541,8 @@ def rematch(el, l): 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: