Peter Donald wrote:
The diff below has seemed to break a whole bunch of my build files and I am not imediately sure why.I am not in a position to be able to test this immediately, but have you tried a small testcase?
There are four possible scenarios:
1) inheritall = true, dir attribute specified 2) inheritall = true, no dir attribute 3) inheritall = false, dir attribute specified 4) inheritall = false, no dir attribute
You can write a pair of tiny buildfiles to test each one...
I did this, and all tests passed as expected when I first developed the patch.
However, I did not submit the test code, because I could not figure out how to automate it.
The problem is-- how can you retrieve values from a new project in our junit framework?
I don't know how to get my grubby hands on the newproject instance.
Therefore I could not automate the tests, and sent an email to the list about it (no replies yet):
http://www.mail-archive.com/ant-dev%40jakarta.apache.org/msg10079.html
I guess we could add some sort of hook or use reflection or something, but it might involve some
changes to non-test code. Then again, refactoring code to facilitate testing is not such a bad thing, right?
Another alternative would be to print something using the echo task and grab stdout. Kind of icky,
but it would avoid changes to non-test code.
As soon as I emerge from my current work-crisis, I will spend some time on this...
HTH,
--Craeg
