ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject AW: AW: running junit on ant source
Date Fri, 14 Feb 2003 11:26:13 GMT
The test build.xml is one directory over the "expected":

Jan Matèrne

-----Ursprüngliche Nachricht-----
Von: Adam Hardy []
Gesendet am: Freitag, 14. Februar 2003 11:06
An: Ant Users List
Betreff: Re: AW: running junit on ant source

No I'm using Linux. I haven't figured out how to make emacs show CRLF 
symbols visibly, but the file sizes are different.

The file in expected is 27 bytes, but the one generated in result is 26 

The original input with three lines in is also has the extra CRs in.

I guess somebody fixed the files for windows, and now it doesn't work 
for Linux!

Unfortunately emacs preserves whatever end-of-line character is there 
when I save.

I fixed the test case build.xml by using fixcrlf as you suggested. I put

<fixcrlf srcdir="input"/>
<fixcrlf srcdir="expected"/>

in the test target, and it executes OK now.

Do you think the test build.xml is in the source database? Sorry I 
haven't looked that far yet. I'll try submitting it when I get through 
the other tests (Another one just failed). Well spotted, by the way. I 
would have poured over the source code for ages before looking at the CRLFs! wrote:
> I had the same.
> Do you work on windows?
> If you have a look at src\etc\testcases\filters\expected\linecontains.test
> it contains unixlike line separators. The generated file (very short time
> src\etc\testcases\filters\result\linecontains.test) has - because running
> windows - windowslike line separators. And they are different, so the test
> fail.
> Maybe there should be a solution by inserting a <fixcrlf> in the main
> file. But a workaround is to <fixcrlf> in your local source or do that
> an editor (I opened that an on resave a got the windows line sep´s).
> Jan Matèrne
> -----Ursprüngliche Nachricht-----
> Von: Adam Hardy []
> Gesendet am: Donnerstag, 13. Februar 2003 17:36
> An: user >> Ant Users List
> Betreff: running junit on ant source
> I'm doing some mods to two of the ant source classes, and I'm following 
> the guidelines from the ant docs about running tests under junit and 
> creating new tests.
> I'm new to junit today actually and I'm using "ant run-tests" in the ant 
> home directory to make sure all the junit tests that come with the 
> source code work.
> I get this failure on the first testcase junit comes to and I don't know 
> what it means. Is it obvious to anyone what's wrong here? I presume the 
> problem lies with my set-up, because according to junit, I should get 
> more info when a test fails - I presume that the "null" here would 
> normally be a line or 2 about what failed:
>      [junit] Testcase: 
> testLineContains(  FAILED
>      [junit] null
>      [junit] junit.framework.AssertionFailedError
> Thanks if you can help,
> Adam
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message