ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Martin <j...@custommonkey.org>
Subject Re: GzipTest suddenly fails for me
Date Wed, 27 Feb 2002 18:34:25 GMT
Ah, sorry about that. Got side tracked before I finished it. Forgot that
that that test didn't pass and submitted the path think I was done.

I feel soooo ashamed.

That one confused me as the test actually checks for "attribute zipfile
invalid" and the exception that's thrown at the line you talking about
is "zipfile attribute is required" so something is very wrong. I
couldn't work out where the exception was being thrown.


On Wed, 2002-02-27 at 16:20, Stefan Bodewig wrote:
> and I don't understand why it has ever worked.
> 
> The test causing trouble is test4:
> 
> <target name="test4">
>   <gzip src="gzip.xml" zipfile=""/>
> </target>
> 
> This has been the target for a veeery long time.  GzipTest expects it
> to fail because zipfile is not valid (so it says) - no changes here as
> well.
> 
> The code in Pack that is supposed to throw the BuildException has been
> 
>         if (zipFile == null) {
>             throw new BuildException("zipfile attribute is required", location);
>         }
> 
> until Jeff's patch turned it into
> 
>         if (zipFile == null || zipFile.getName().equals("")) {
>             throw new BuildException("zipfile attribute is required", location);
>         }
> 
> OK, now I pass an empty String as zipfile attribute, this will go
> through Project.resolveFile and gets out of this as the project's
> basedir.
> 
> At least on my box, getName() on the project's basedir returns the
> name of the directory and not an empty String - i.e. taskdefs in the
> case of our testcase.  This explains why the second condition cannot
> be matched.
> 
> zipFile is non-null and I cannot see how this test can have ever
> passed as it shouldn't have been null at any time.
> 
> Any idea?
> 
> Stefan
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>
> 
-- 
Jeff Martin

Memetic Engineer

http://www.custommonkey.org/ 


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


Mime
View raw message