ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: testing <condition>
Date Wed, 16 Jan 2002 12:36:09 GMT
On Sun, 13 Jan 2002, Steve Loughran <steve_l@iseran.com> wrote:

> One thing I am not filing is the fact that <and> and <or> with one
> parameter each
> 
>   <target name="orincomplete">
>     <condition property="orincomplete">
>       <or>
>         <equals arg1="a" arg2="a" />
>       </or>
>     </condition>
>     <echo>${orincomplete}</echo>
>   </target>

expected behavior (to me, at least).

>   <target name="andincomplete">
>     <condition property="andincomplete">
>       <and>
>         <equals arg1="a" arg2="B" />
>       </and>
>     </condition>
>     <echo>${andincomplete}</echo>
>   </target>
> 
> are both successful;

This one is not successful for me, typo?  If arg2="B" is supposed to
be arg2="a", then it passes and is again what I'd expect.

> Now for some more fun, what if there are no child tests?
> 
>   <target name="orempty">
>     <condition property="orempty">
>       <or/>
>     </condition>
>     <echo>${orempty}</echo>
>   </target>

Let's make <or> and <and> throw exceptions in this case.

Stefan

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