changeset 28036:b5069c2b6f62

tests: make chunk header of external diff glob-ed for portability Before this patch, some tests using external "diff" command via extdiff extension fail on Solaris, because system standard "diff" (= /usr/bin/diff) on Solaris always generates chunk headers below: - "@@ -1,0 +1,nnnn @@" for added file - "@@ -1,nnnn +1,0 @@" for removed file even though "diff" on Linux generates: - "@@ -0,0 +1,nnnn @@" for added file - "@@ -1,nnnn +0,0 @@" for removed file This patch makes chunk header of external diff glob-ed for portability of tests. "hg diff" output follows Linux style, and there are many such diff output lines in existing tests. This is reason why this patch doesn't add check-code.py any rule to detect such diff output in tests. This patch is a part of making tests using external "diff" portable, and test-subrepo-deep-nested-change.t isn't yet portable even after this patch.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 08 Feb 2016 18:29:17 +0900
parents c65da6892ae5
children 54c896f8bb79
files tests/test-subrepo-deep-nested-change.t
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-subrepo-deep-nested-change.t	Mon Feb 08 18:29:17 2016 +0900
+++ b/tests/test-subrepo-deep-nested-change.t	Mon Feb 08 18:29:17 2016 +0900
@@ -738,17 +738,17 @@
   diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob)
   --- cloned.*/.hglf/b.dat	* (glob)
   +++ cloned.*/.hglf/b.dat	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +da39a3ee5e6b4b0d3255bfef95601890afd80709
   diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob)
   --- cloned.*/.hglf/foo/bar/large.dat	* (glob)
   +++ cloned.*/.hglf/foo/bar/large.dat	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +2f6933b5ee0f5fdd823d9717d8729f3c2523811b
   diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob)
   --- cloned.*/.hglf/large.bin	* (glob)
   +++ cloned.*/.hglf/large.bin	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +7f7097b041ccf68cc5561e9600da4655d21c6d18
   diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob)
   --- cloned.*/.hgsub	* (glob)
@@ -766,7 +766,7 @@
   diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob)
   --- cloned.*/foo/bar/def	* (glob)
   +++ cloned.*/foo/bar/def	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +changed
   diff -Nru cloned.*/main cloned.*/main (glob)
   --- cloned.*/main	* (glob)
@@ -783,7 +783,7 @@
   diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob)
   --- cloned.*/sub1/sub2/folder/test.txt	* (glob)
   +++ cloned.*/sub1/sub2/folder/test.txt	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +subfolder
   diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob)
   --- cloned.*/sub1/sub2/sub2	* (glob)
@@ -794,7 +794,7 @@
   diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob)
   --- cloned.*/sub3/a.txt	* (glob)
   +++ cloned.*/sub3/a.txt	* (glob)
-  @@ -0,0 +1* @@ (glob)
+  @@ -*,0 +1* @@ (glob)
   +xyz
   [1]