Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
28034:e7ff258f71df | 28035:c65da6892ae5 |
---|---|
783 diff --git a/s/barfoo b/s/barfoo | 783 diff --git a/s/barfoo b/s/barfoo |
784 new file mode 100644 | 784 new file mode 100644 |
785 index 0000000..257cc56 | 785 index 0000000..257cc56 |
786 --- /dev/null | 786 --- /dev/null |
787 +++ b/s/barfoo | 787 +++ b/s/barfoo |
788 @@ -0,0 +1 @@ | 788 @@ -0,0 +1* @@ (glob) |
789 +foo | 789 +foo |
790 $ hg diff --subrepos s/foobar | 790 $ hg diff --subrepos s/foobar |
791 diff --git a/s/foobar b/s/foobar | 791 diff --git a/s/foobar b/s/foobar |
792 index 8a5a5e2..bd5812a 100644 | 792 index 8a5a5e2..bd5812a 100644 |
793 --- a/s/foobar | 793 --- a/s/foobar |
825 diff --git a/s/barfoo b/s/barfoo | 825 diff --git a/s/barfoo b/s/barfoo |
826 new file mode 100644 | 826 new file mode 100644 |
827 index 0000000..257cc56 | 827 index 0000000..257cc56 |
828 --- /dev/null | 828 --- /dev/null |
829 +++ b/s/barfoo | 829 +++ b/s/barfoo |
830 @@ -0,0 +1 @@ | 830 @@ -0,0 +1* @@ (glob) |
831 +foo | 831 +foo |
832 | 832 |
833 moving a file should show a removal and an add | 833 moving a file should show a removal and an add |
834 $ hg revert --all | 834 $ hg revert --all |
835 reverting subrepo ../gitroot | 835 reverting subrepo ../gitroot |