changeset 23134:22e76e370611

test-revert.t: fix wc check-code false positive
author Matt Mackall <mpm@selenic.com>
date Mon, 03 Nov 2014 11:06:51 -0600
parents 336e19a473d9
children e637dd64ba72
files contrib/check-code.py tests/test-revert.t
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Nov 03 14:01:52 2014 -0600
+++ b/contrib/check-code.py	Mon Nov 03 11:06:51 2014 -0600
@@ -94,7 +94,7 @@
     (r'sed.*-i', "don't use 'sed -i', use a temporary file"),
     (r'\becho\b.*\\n', "don't use 'echo \\n', use printf"),
     (r'echo -n', "don't use 'echo -n', use printf"),
-    (r'(^| )\bwc\b[^|]*$\n(?!.*\(re\))', "filter wc output"),
+    (r'(^|\|\s*)\bwc\b[^|]*$\n(?!.*\(re\))', "filter wc output"),
     (r'head -c', "don't use 'head -c', use 'dd'"),
     (r'tail -n', "don't use the '-n' option to tail, just use '-<num>'"),
     (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"),
--- a/tests/test-revert.t	Mon Nov 03 14:01:52 2014 -0600
+++ b/tests/test-revert.t	Mon Nov 03 11:06:51 2014 -0600
@@ -733,7 +733,7 @@
 
 Setup working directory
 
-  $ python ../gen-revert-cases.py wc | cat
+  $ python ../gen-revert-cases.py wc
   $ hg addremove --similarity 0
   removing added_removed
   removing added_revert