ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22446] New: - <apply> uses the "inputstring" only first time
Date Fri, 15 Aug 2003 05:36:59 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22446>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22446

<apply> uses the "inputstring" only first time

           Summary: <apply> uses the "inputstring" only first time
           Product: Ant
           Version: 1.6Alpha (nightly)
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: jan@materne.de
                CC: jan@materne.de


A discussion on the Dev@Ant list (http://marc.theaimsgroup.com/?l=ant-
user&m=106090613520168&w=2) shows that error.

For a quick validate of that behaviour a created an ant buildfile and a little 
perl script. The perl script prints all parameters into a log file then reads a 
line from STDIN and prints that into the log file, too.

build.xml
-----------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">
    <target name="main">
        <apply executable="perl" inputstring="Hallo ">
            <arg value="say.pl"/>
            <fileset dir="." includes="*.txt"/>
        </apply>

        <loadfile property="file" srcFile="log.log" failonerror="false"/>
        <property name="file" value=""/>
        <echo>${line.separator}${file}${line.separator}${line.separator}</echo>
        <delete file="log.log"/>
    </target>
</project>


say.pl
-----------------------------------------------
open (LOG, ">>log.log");
select LOG;

print "say.pl: ";
foreach $arg (@ARGV) {
    print "$arg ";
}
print "\n";

$input = <STDIN>;
print "Input: $input\n\n";

close LOG;



log.log
-----------------------------------------------
say.pl: C:\temp\apply-test\one.txt 
Input: Hallo 

say.pl: C:\temp\apply-test\three.txt 
Input: 

say.pl: C:\temp\apply-test\two.txt 
Input: 




Now I try to put that into a JUnit testcase ...

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


Mime
View raw message