test-mq on FreeBSD
Maxim Dounin
mdounin at mdounin.ru
Wed May 28 08:22:23 CDT 2008
Hello!
On Wed, May 28, 2008 at 02:59:02PM +0200, Adrian Buehlmann wrote:
>Just a minor point. When running the testsuite on FreeBSD 6.2, I always get:
>
>ERROR: test-mq output changed
>--- Expected output
>+++ Test output
>@@ -499,7 +499,7 @@
> abort: local changes found, refresh first
> % apply force, should not discard changes with empty patch
> applying empty
>-/usr/bin/patch: **** Only garbage was found in the patch input.
>+patch: **** Only garbage was found in the patch input.
> patch failed, unable to continue (try -v)
> patch empty is empty
> Now at: empty
>
>Could we agree on using that output on all unixes by doing
>the patch below?
Hmm, looks like you patch isn't FreeBSD native /usr/bin/patch.
:-)
With native one you should get something like:
--- Expected output
+++ Test output
@@ -498,9 +498,7 @@
abort: local changes found, refresh first
% apply force, should not discard changes with empty patch
applying empty
-/usr/bin/patch: **** Only garbage was found in the patch input.
-patch failed, unable to continue (try -v)
-patch empty is empty
+Hmm... I can't seem to find a patch in there anywhere.
Now at: empty
diff -r bf5fc3f07a0a hello.txt
--- a/hello.txt
I've already posted correct fix for this a while ago, it basically
does the same thing I've already done in rev. 38b592536a58 for
other such tests. It strips anything that comes from patch(1) and a
bit more, since patch(1) may not fail on empty patch and print
warning instead (like FreeBSD patch(1) does).
diff --git a/tests/test-mq b/tests/test-mq
--- a/tests/test-mq
+++ b/tests/test-mq
@@ -520,7 +520,7 @@ hg qpush
hg qpush
echo % apply force, should not discard changes with empty patch
-hg qpush -f
+hg qpush -f 2>&1 | grep 'Now at'
hg diff --config diff.nodates=True
hg qdiff --config diff.nodates=True
hg log -l1 -p
diff --git a/tests/test-mq.out b/tests/test-mq.out
--- a/tests/test-mq.out
+++ b/tests/test-mq.out
@@ -497,10 +497,6 @@ Patch queue now empty
% qpush should fail, local changes
abort: local changes found, refresh first
% apply force, should not discard changes with empty patch
-applying empty
-/usr/bin/patch: **** Only garbage was found in the patch input.
-patch failed, unable to continue (try -v)
-patch empty is empty
Now at: empty
diff -r bf5fc3f07a0a hello.txt
--- a/hello.txt
Maxim Dounin
>
>diff -r 5868d0b8509f tests/test-mq
>--- a/tests/test-mq Sun May 25 13:39:08 2008 -0700
>+++ b/tests/test-mq Wed May 28 14:49:49 2008 +0200
>@@ -520,7 +520,7 @@
> hg qpush
>
> echo % apply force, should not discard changes with empty patch
>-hg qpush -f
>+hg qpush -f 2>&1 | sed 's/\/usr\/bin\/patch:/patch:/'
> hg diff --config diff.nodates=True
> hg qdiff --config diff.nodates=True
> hg log -l1 -p
>diff -r 5868d0b8509f tests/test-mq.out
>--- a/tests/test-mq.out Sun May 25 13:39:08 2008 -0700
>+++ b/tests/test-mq.out Wed May 28 14:49:49 2008 +0200
>@@ -499,7 +499,7 @@
> abort: local changes found, refresh first
> % apply force, should not discard changes with empty patch
> applying empty
>-/usr/bin/patch: **** Only garbage was found in the patch input.
>+patch: **** Only garbage was found in the patch input.
> patch failed, unable to continue (try -v)
> patch empty is empty
> Now at: empty
>
>
>
>_______________________________________________
>Mercurial-devel mailing list
>Mercurial-devel at selenic.com
>http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list