diff tests/test-subrepo-deep-nested-change.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 b5069c2b6f62
children 3072ce740945
line wrap: on
line diff
--- a/tests/test-subrepo-deep-nested-change.t	Sun Feb 07 09:36:09 2016 +0100
+++ b/tests/test-subrepo-deep-nested-change.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
 
 Preparing the subrepository 'sub2'
@@ -717,9 +717,9 @@
 
 Interaction with extdiff, largefiles and subrepos
 
-  $ hg --config extensions.extdiff= extdiff -S
+  $ hg --config extensions.extdiff= pdiff -S
 
-  $ hg --config extensions.extdiff= extdiff -r '.^' -S
+  $ hg --config extensions.extdiff= pdiff -r '.^' -S
   diff -Nru cloned.*/.hgsub cloned/.hgsub (glob)
   --- cloned.*/.hgsub	* (glob)
   +++ cloned/.hgsub	* (glob)
@@ -734,7 +734,7 @@
   -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3
   [1]
 
-  $ hg --config extensions.extdiff= extdiff -r 0 -r '.^' -S
+  $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S
   diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
   --- cloned.*/.hglf/b.dat	* (glob)
   +++ cloned.*/.hglf/b.dat	* (glob)
@@ -799,7 +799,7 @@
   [1]
 
   $ echo mod > sub1/sub2/sub2
-  $ hg --config extensions.extdiff= extdiff -S
+  $ hg --config extensions.extdiff= pdiff -S
   --- */cloned.*/sub1/sub2/sub2	* (glob)
   +++ */cloned/sub1/sub2/sub2	* (glob)
   @@ -1* +1* @@ (glob)