ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EJ Ciramella <ecirame...@archivas.com>
Subject Re: Condition contains question
Date Wed, 22 Jun 2005 23:11:10 GMT
Never mind, string and substring are reversed. . .
On Jun 22, 2005, at 7:06 PM, EJ Ciramella wrote:

> I'm trying the following:
>
>   <loadfile property="grinder.results" srcFile="grinderpass.csv"/>
>   <echo message="${grinder.results}"/>
>   <condition property="hasfailed">
>     <contains string="FAIL" substring="${grinder.results}"  
> casesensitive="false"/>
>   </condition>
>   <fail if="hasfailed" message="${grinder.results}"/>
>
> But even when the file only contains "FAIL" this still goes through  
> stating:
>
> testscp:
> [loadfile] loading /home/source/engineering/main/grinderpass.csv  
> into property grinder.results
> [loadfile] file size = 5
> Setting project property: grinder.results -> FAIL
> [loadfile] loaded 5 characters
> [loadfile] grinder.results := FAIL
>      [echo] FAIL
> Condition false; not setting hasfailed
>
> When run in debug/verbose mode.  Is it looking at the string "$ 
> {grinder.results}" or the value of this property?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>


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


Mime
View raw message