comparison contrib/check-code.py @ 28033:0707bbec682d

tests: omit -p for external diff via extdiff extension for portability Before this patch, some tests using external "diff" command via extdiff extension fail on Solaris, because "-p" (show which C function each change is in) option isn't supported by system standard "diff" on Solaris, even though extdiff passes it to external "diff" by default. Fortunately, this non-portable option isn't important for (current, at least) tests using external "diff" command via extdiff extension. This patch omits "-p" for external "diff" command via extdiff extension for portability of tests, and adds check-code.py a rule to detect invocation of "diff" with "-p". Newly added check-code.py rule examines only lines generated by external "diff" with "-r", because strict examination might misidentify "hg diff -p" or other complicated lines consisting of "diff" string as wrong one. This patch is a part of making tests using external "diff" portable, and tests below aren't yet portable even after this patch. test-graft.t test-largefiles-update.t test-subrepo-deep-nested-change.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 08 Feb 2016 18:29:17 +0900
parents e77ac31b64a1
children e7ff258f71df
comparison
equal deleted inserted replaced
28032:8157c6b82f40 28033:0707bbec682d
174 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg), 174 (r'^ .*: largefile \S+ not available from file:.*/.*[^)]$', winglobmsg),
175 (r'^ .*file://\$TESTTMP', 175 (r'^ .*file://\$TESTTMP',
176 'write "file:/*/$TESTTMP" + (glob) to match on windows too'), 176 'write "file:/*/$TESTTMP" + (glob) to match on windows too'),
177 (r'^ (cat|find): .*: No such file or directory', 177 (r'^ (cat|find): .*: No such file or directory',
178 'use test -f to test for file existence'), 178 'use test -f to test for file existence'),
179 (r'^ diff -[^ -]*p',
180 "don't use (external) diff with -p for portability"),
179 ], 181 ],
180 # warnings 182 # warnings
181 [ 183 [
182 (r'^ [^*?/\n]* \(glob\)$', 184 (r'^ [^*?/\n]* \(glob\)$',
183 "glob match with no glob character (?*/)"), 185 "glob match with no glob character (?*/)"),