diff -r 987a80dec7db -r 27b5b55ff3d3 tests/run-tests.py --- a/tests/run-tests.py Mon Mar 24 22:12:37 2014 -0700 +++ b/tests/run-tests.py Sun Apr 13 19:01:00 2014 +0200 @@ -696,9 +696,12 @@ if not l.endswith('\n'): l += '\n' if l.startswith('#if'): + lsplit = l.split() + if len(lsplit) < 2 or lsplit[0] != '#if': + after.setdefault(pos, []).append(' !!! invalid #if\n') if skipping is not None: after.setdefault(pos, []).append(' !!! nested #if\n') - skipping = not hghave(l.split()[1:]) + skipping = not hghave(lsplit[1:]) after.setdefault(pos, []).append(l) elif l.startswith('#else'): if skipping is None: