# HG changeset patch # User Matt Mackall # Date 2014-11-03 17:06:51 # Node ID 22e76e37061161d265d2ca2a5a5ef2e5c3b0e7dd # Parent 336e19a473d9d1a4bbf380911893bdfebbb7bc99 test-revert.t: fix wc check-code false positive diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -94,7 +94,7 @@ testpats = [ (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 '-'"), (r'sha1sum', "don't use sha1sum, use $TESTDIR/md5sum.py"), diff --git a/tests/test-revert.t b/tests/test-revert.t --- a/tests/test-revert.t +++ b/tests/test-revert.t @@ -733,7 +733,7 @@ Create parent changeset 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