ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject testing <condition>
Date Sun, 13 Jan 2002 23:29:21 GMT
I am adding a new condition, <filesmatch> which will test two files for
byte-for-byte compatibility; good for deployment testing.

To do this I have had to
    -add another entry to the conditon list; we need some kind of
introspection helper
    -write the test code for condition.

I am filing bug reports for <condition> as I go. One thing I am not filing
is the fact that <and> and <or> with one parameter each

  <target name="orincomplete">
    <condition property="orincomplete">
        <equals arg1="a" arg2="a" />

  <target name="andincomplete">
    <condition property="andincomplete">
        <equals arg1="a" arg2="B" />

are both successful; I am not sure this is valid or not.

Now for some more fun, what if there are no child tests?

  <target name="orempty">
    <condition property="orempty">

or does not set the property; it is effectively returning false

Empty and :

  <target name="andempty">
    <condition property="andempty">

returns true, which is a very wierd bit of logic "if there is no test,
return true".

What should the correct behaviour be?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message