ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: test failures in gump
Date Wed, 02 Mar 2011 10:34:24 GMT
On 2011-03-02, Antoine Levy-Lambert wrote:

> On top of that I tried to make sense of the error message of
> replacetokens-test.xml (below) but I do not get it ...

> Regards,

> Antoine

> au:antunit] Build File: /srv/gump/public/workspace/ant/src/tests/antunit/filters/replacetokens-test.xml
> [au:antunit] Tests run: 2, Failures: 1, Errors: 0, Time elapsed: 0.429 sec
> [au:antunit] Target: testFileEndsWithToken took 0.026 sec
> [au:antunit] Target: testPropertiesResource  FAILED
> [au:antunit] 	at line 179, column 37
> [au:antunit] 	Message: Expected resource '/tmp/testoutput/text.txt' to contain value
'Hello, Ant!' but was '${/tmp/testoutput/text.txt}'
> [au:antunit] 	took 0.334 sec

8-)

The message of assertResourceContains is pretty useless.  What it tries
to say is that the expected resource exists (AntUnit's trunk that you
use in Gump would emit a different error message if it didn't exist) but
doesn't contain the expected text.

Since assertResourceContains uses the resourcecontains condition under
the covers it doesn't have access to the original content and thus
doesn't display a better error message.

We could make it load the resource under test via loadresource and use
that, but that would load a potentially big file twice - and one of the
loads wouldn't be required if the test passes.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message