Mercurial > public > mercurial-scm > hg-stable
comparison contrib/check-code.py @ 27557:28b5c4fcf48d
tests: Solaris diff -U also emits "No differences encountered"
This came up before, but the tests in check-code.py don't find -U (only -u)
and they don't work when the diff is inside a shell function. This fixes
the offending tests and beefs up check-code.py.
author | Danek Duvall <danek.duvall@oracle.com> |
---|---|
date | Sun, 27 Dec 2015 15:24:48 -0800 |
parents | b81b8dbecc26 |
children | 15b06f306c1f |
comparison
equal
deleted
inserted
replaced
27556:1df9b8b2abda | 27557:28b5c4fcf48d |
---|---|
120 (r'/dev/u?random', "don't use entropy, use /dev/zero"), | 120 (r'/dev/u?random', "don't use entropy, use /dev/zero"), |
121 (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), | 121 (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), |
122 (r'^( *)\t', "don't use tabs to indent"), | 122 (r'^( *)\t', "don't use tabs to indent"), |
123 (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)', | 123 (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)', |
124 "put a backslash-escaped newline after sed 'i' command"), | 124 "put a backslash-escaped newline after sed 'i' command"), |
125 (r'^diff *-\w*u.*$\n(^ \$ |^$)', "prefix diff -u with cmp"), | 125 (r'^diff *-\w*[uU].*$\n(^ \$ |^$)', "prefix diff -u/-U with cmp"), |
126 (r'^\s+(if)? diff *-\w*[uU]', "prefix diff -u/-U with cmp"), | |
126 (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"), | 127 (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"), |
127 (r'\butil\.Abort\b', "directly use error.Abort"), | 128 (r'\butil\.Abort\b', "directly use error.Abort"), |
128 (r'\|&', "don't use |&, use 2>&1"), | 129 (r'\|&', "don't use |&, use 2>&1"), |
129 ], | 130 ], |
130 # warnings | 131 # warnings |