diff tests/test-largefiles-update.t @ 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 ca2a0a654f54
children c65da6892ae5
line wrap: on
line diff
--- a/tests/test-largefiles-update.t	Sun Feb 07 22:18:24 2016 -0800
+++ b/tests/test-largefiles-update.t	Mon Feb 08 18:29:17 2016 +0900
@@ -6,6 +6,9 @@
   > merge = internal:fail
   > [extensions]
   > largefiles =
+  > [defaults]
+  > # for portability
+  > extdiff = --option -Nru
   > EOF
 
   $ hg init repo
@@ -21,13 +24,13 @@
   $ echo 'normal1 in #1' > normal1
   $ hg commit -m '#1'
   $ hg extdiff -r '.^' --config extensions.extdiff=
-  diff -Npru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1
+  diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1
   --- repo.0d9d9b8dc9a3/.hglf/large1	* (glob)
   +++ repo/.hglf/large1	* (glob)
   @@ -1 +1 @@
   -4669e532d5b2c093a78eca010077e708a071bb64
   +58e24f733a964da346e2407a2bee99d9001184f5
-  diff -Npru repo.0d9d9b8dc9a3/normal1 repo/normal1
+  diff -Nru repo.0d9d9b8dc9a3/normal1 repo/normal1
   --- repo.0d9d9b8dc9a3/normal1	* (glob)
   +++ repo/normal1	* (glob)
   @@ -1 +1 @@