You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2008/03/04 15:11:33 UTC

Re: svn commit: r633476 - /ant/core/trunk/src/etc/testcases/taskdefs/import/recursive-selfimport.xml

On Tue, 04 Mar 2008, <bo...@apache.org> wrote:

> add "testcase" for bug 44323

The quotes are here because the build file

,----
| <project>
|   <echo>Before import: ${foo}</echo>
|   <property name="foo" value="bar"/>
|   <import file="./recursive-selfimport.xml"/>
| </project>
`----

demonstrates the problem:

,----
| stefan@v30161:~/ASF/ant/ant-HEAD> ./build.sh -f src/etc/testcases/taskdefs/import/recursive-selfimport.xml 
| Buildfile: src/etc/testcases/taskdefs/import/recursive-selfimport.xml
| Before import: ${foo}
| Before import: bar
| 
| BUILD SUCCESSFUL
| Total time: 0 seconds
`----

The line "Before import: bar" must not be there at all.

But, the bug only surfaces when the build file name has been given as
a relative path.  Contrast with

,----
| stefan@v30161:~/ASF/ant/ant-HEAD> ./build.sh -f `pwd`/src/etc/testcases/taskdefs/import/recursive-selfimport.xml 
| Buildfile: /home/stefan/ASF/ant/ant-HEAD/src/etc/testcases/taskdefs/import/recursive-selfimport.xml
| Before import: ${foo}
| 
| BUILD SUCCESSFUL
| Total time: 1 second
`----

Our AntUnit as well as our JUnit tests (at least when run inside of
BuildFileTest) will always pass the absolute file name into the test,
so the bug is hidden.

Stefan

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