First two comes from me. But I think this is a common problem. Especially
in the filter section the (rare) testcases follow these steps:

1. provide an input file --> platform dependend line endings (where was it
written)
2. modify it via Ant --> on which platform runs this test
3. result must be equal to an "expected" result file --> like 1.

Three solutions come into my mind:

I.   Prepare the provided files (1+3) with <fixcrlf>, so that they have
     the line endings on the test-platform.

II.  Define a standard platform (e.g. Linux). Prepare the testresult (2) 
     after the test run with <fixcrlf>, so that they have the line endings
     according to the standard platform.

III. The implementation for step 3 is usually done with
        executeTarget("testXXX");
        File expected = getProject().resolveFile("expected/EXPECTED");
        File result = getProject().resolveFile("result/RESULT");
        FileUtils fu = FileUtils.newFileUtils();
        assertTrue(fu.contentEquals(expected, result));
     So we can modify the contentEquals so that it ignores the line
separators.
     (Or create a new method doing so, contentEqualsIgnoreLineEndings()).


comment?


Jan Matčrne


> -----Ursprüngliche Nachricht-----
> Von: Stefan Bodewig [mailto:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 15. April 2003 08:39
> An: [EMAIL PROTECTED]
> Betreff: Test failures (Gump is coming to tell us anyway ...)
> 
> Like for Jesse, testTailSkip and testTailLinesSkip fail on Linux for
> me, I bet it is a line ending problem.  As the nightly Gump build is
> performed on Linux as well, we are going to get nagged.
> 
> In addition, testScriptFilter fails.  It seems as if the new filter
> was using the old IBM BSF package names, while the rest of Ant has
> switched to Apache BSF.  The later is on my CLASSPATH, so bsf.present
> gets set and the test is run, but fails due to a 
> java.lang.NoClassDefFoundError: com/ibm/bsf/util/BSFEngineImpl.
> 
> I'll try to look into them later today but wouldn't mind if anybody
> else was faster 8-)
> 
> Stefan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to