comparison contrib/check-code.py @ 20598:e57e2da803aa

solaris: diff -u emits "No differences encountered" Solaris diff -u isn't silent when two files are identical, and tests that don't account for that will fail. Fix those tests, and introduce a check that prevents reintroduction.
author Danek Duvall <danek.duvall@oracle.com>
date Wed, 19 Feb 2014 13:46:49 -0800
parents f1a3ae7c15df
children a61ed1c2d7a7
comparison
equal deleted inserted replaced
20597:9155257e6330 20598:e57e2da803aa
119 (r'/dev/u?random', "don't use entropy, use /dev/zero"), 119 (r'/dev/u?random', "don't use entropy, use /dev/zero"),
120 (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"), 120 (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"),
121 (r'^( *)\t', "don't use tabs to indent"), 121 (r'^( *)\t', "don't use tabs to indent"),
122 (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)', 122 (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)',
123 "put a backslash-escaped newline after sed 'i' command"), 123 "put a backslash-escaped newline after sed 'i' command"),
124 (r'^diff *-\w*u.*$\n(^ \$ |^$)', "prefix diff -u with cmp"),
124 ], 125 ],
125 # warnings 126 # warnings
126 [ 127 [
127 (r'^function', "don't use 'function', use old style"), 128 (r'^function', "don't use 'function', use old style"),
128 (r'^diff.*-\w*N', "don't use 'diff -N'"), 129 (r'^diff.*-\w*N', "don't use 'diff -N'"),