ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject Re: cvs commit: jakarta-ant/src/etc/testcases/taskdefs gzip.xml
Date Sat, 17 Nov 2001 21:03:24 GMT

Stefan:

>     <target name="test5">
>  -    <gzip src="." zipfile="gzip.tmp"/>
>  +    <gzip src="gzip.xml" zipfile="gzip.tmp"/>
>     </target>

I just wanted to bring to your attention that, in
addition to test5, test4 too needs to be fixed.

Snip from src/etc/testcases/taskdefs/gzip.xml:

  <target name="test4">
    <gzip src="." zipfile=""/>
  </target>

and its equivalent test code:

    public void test4() { 
        expectBuildException("test4", "attribute zipfile invalid");
    }

This test is aimed at catching an empty zipfile 
attribute.  But instead of supplying a valid src
attribute with an invalid zipfile argument, the code
does otherwise.  This leads to a problem in the sense 
that if src is checked first in GZip.java (Pack.java),
test4 will still fail, but with the wrong exception.
What I am trying to say is, irrespective of the order
in which the attributes are being validated, each
test here should concentrate on generating one
consistent exception.  I don't know if I have made my 
point clear enough, but here is what would solve this
issue:

  <target name="test4">
    <gzip src="gzip.xml" zipfile=""/>
  </target>

Magesh
 


--
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