Ignore line end diffs on unit tests

This commit is contained in:
James Roseborough
2010-07-06 14:45:27 +00:00
parent e744b9be2b
commit ef6e5120a9
2 changed files with 6 additions and 2 deletions

View File

@@ -86,8 +86,10 @@ public class ScriptDrivenTest extends TestCase {
chunk.call(LuaValue.valueOf(platform.toString())); chunk.call(LuaValue.valueOf(platform.toString()));
ps.flush(); ps.flush();
final String actualOutput = new String(output.toByteArray()); String actualOutput = new String(output.toByteArray());
final String expectedOutput = getExpectedOutput(testName); String expectedOutput = getExpectedOutput(testName);
actualOutput = actualOutput.replaceAll("\r\n", "\n");
expectedOutput = expectedOutput.replaceAll("\r\n", "\n");
assertEquals(expectedOutput, actualOutput); assertEquals(expectedOutput, actualOutput);
} finally { } finally {

View File

@@ -53,6 +53,8 @@ public class Luajvm1CompatibilityTest extends TestCase {
jarpath = "jar:"+zip.toExternalForm()+"!/"; jarpath = "jar:"+zip.toExternalForm()+"!/";
String lua = luaRun(test); String lua = luaRun(test);
String luaj20 = luaj20Run(test); String luaj20 = luaj20Run(test);
lua = lua.replaceAll("\r\n", "\n");
luaj20 = luaj20.replaceAll("\r\n", "\n");
assertEquals( lua, luaj20 ); assertEquals( lua, luaj20 );
} catch ( Exception ioe ) { } catch ( Exception ioe ) {
fail( ioe.toString() ); fail( ioe.toString() );