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()));
ps.flush();
final String actualOutput = new String(output.toByteArray());
final String expectedOutput = getExpectedOutput(testName);
String actualOutput = new String(output.toByteArray());
String expectedOutput = getExpectedOutput(testName);
actualOutput = actualOutput.replaceAll("\r\n", "\n");
expectedOutput = expectedOutput.replaceAll("\r\n", "\n");
assertEquals(expectedOutput, actualOutput);
} finally {

View File

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