diff tests/test-subrepo-git.t @ 28035:c65da6892ae5

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 formats chunk header in the style below: @@ -X.x +Y.y @@ even though "diff" on Linux sometimes omits ".x" and/or ".y" in it. This patch makes chunk header of external diff glob-ed for portability of tests, and adds check-code.py rules to detect such diff output in tests. This patch also changes "hg diff" output in test-subrepo-git to simplify detection rules, even though it is certainly portable because these lines are generated by "git" command. This patch is a part of making tests using external "diff" portable, and tests below aren't yet portable even after this patch. 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 b54b520a24c2
children ff0d3b6b287f
line wrap: on
line diff
--- a/tests/test-subrepo-git.t	Mon Feb 08 18:29:17 2016 +0900
+++ b/tests/test-subrepo-git.t	Mon Feb 08 18:29:17 2016 +0900
@@ -785,7 +785,7 @@
   index 0000000..257cc56
   --- /dev/null
   +++ b/s/barfoo
-  @@ -0,0 +1 @@
+  @@ -0,0 +1* @@ (glob)
   +foo
   $ hg diff --subrepos s/foobar
   diff --git a/s/foobar b/s/foobar
@@ -827,7 +827,7 @@
   index 0000000..257cc56
   --- /dev/null
   +++ b/s/barfoo
-  @@ -0,0 +1 @@
+  @@ -0,0 +1* @@ (glob)
   +foo
 
 moving a file should show a removal and an add