diff tests/test-graft.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 e7ff258f71df
children bd97ed121016
line wrap: on
line diff
--- a/tests/test-graft.t	Sun Feb 07 09:36:09 2016 +0100
+++ b/tests/test-graft.t	Mon Feb 08 18:29:17 2016 +0900
@@ -1,7 +1,7 @@
   $ cat >> $HGRCPATH <<EOF
-  > [defaults]
-  > # for portability
-  > extdiff = --option -Nru
+  > [extdiff]
+  > # for portability:
+  > pdiff = sh "$RUNTESTDIR/pdiff"
   > EOF
 
 Create a repo with some stuff in it:
@@ -348,7 +348,7 @@
   skipping already grafted revision 7:ef0ef43d49e7 (was grafted from 2:5c095ad7e90f)
   [255]
 
-  $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13
+  $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13
   --- */hg-5c095ad7e90f.patch	* (glob)
   +++ */hg-7a4785234d87.patch	* (glob)
   @@ -1,18 +1,18 @@
@@ -379,7 +379,7 @@
   ++a
   [1]
 
-  $ hg extdiff --config extensions.extdiff= --patch -r 2 -r 13 -X .
+  $ hg pdiff --config extensions.extdiff= --patch -r 2 -r 13 -X .
   --- */hg-5c095ad7e90f.patch	* (glob)
   +++ */hg-7a4785234d87.patch	* (glob)
   @@ -1,8 +1,8 @@