changeset 27693:2b9126d6588b

check-code: allow only-whitespace lines in tests These turn out to be necessary to embed diffs with blank lines in test input. So we now complain about whitespace following a character.
author Matt Mackall <mpm@selenic.com>
date Fri, 08 Jan 2016 12:35:02 -0600
parents e0465035def9
children 2dc363274702
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Thu Dec 10 12:56:23 2015 -0600
+++ b/contrib/check-code.py	Fri Jan 08 12:35:02 2016 -0600
@@ -148,7 +148,7 @@
 uprefix = r"^  \$ "
 utestpats = [
   [
-    (r'^(\S.*||  [$>] .*)[ \t]\n', "trailing whitespace on non-output"),
+    (r'^(\S.*||  [$>] \S.*)[ \t]\n', "trailing whitespace on non-output"),
     (uprefix + r'.*\|\s*sed[^|>\n]*\n',
      "use regex test output patterns instead of sed"),
     (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),