diff tests/test-largefiles-update.t @ 28052:b59ef0c21405

tests: use portable diff script via extdiff extension Before this patch, some tests using external "diff" command via extdiff extension fail on Solaris, because of incompatibility of "diff" command and its output. For example, system standard "diff" (= /usr/bin/diff) on Solaris differs from GNU diff in points below: - "-N" (treat absent files as empty) option isn't supported - files are examined not in dictionary order (maybe, in order in storage) This patch introduces portable diff script "pdiff" and make tests use it via extdiff extension. For portability of tests, this patch invokes "pdiff" script with explicit "sh", because standard shell of runtime platform ("cmd.exe" on Windows) is used at first to invoke external diff command.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 08 Feb 2016 18:29:17 +0900
parents c65da6892ae5
children a7f8939641aa 4999c12c526b
line wrap: on
line diff
--- a/tests/test-largefiles-update.t	Sun Feb 07 09:36:09 2016 +0100
+++ b/tests/test-largefiles-update.t	Mon Feb 08 18:29:17 2016 +0900
@@ -6,9 +6,9 @@
   > merge = internal:fail
   > [extensions]
   > largefiles =
-  > [defaults]
-  > # for portability
-  > extdiff = --option -Nru
+  > [extdiff]
+  > # for portability:
+  > pdiff = sh "$RUNTESTDIR/pdiff"
   > EOF
 
   $ hg init repo
@@ -23,7 +23,7 @@
   $ echo 'large1 in #1' > large1
   $ echo 'normal1 in #1' > normal1
   $ hg commit -m '#1'
-  $ hg extdiff -r '.^' --config extensions.extdiff=
+  $ hg pdiff -r '.^' --config extensions.extdiff=
   diff -Nru repo.0d9d9b8dc9a3/.hglf/large1 repo/.hglf/large1
   --- repo.0d9d9b8dc9a3/.hglf/large1	* (glob)
   +++ repo/.hglf/large1	* (glob)