Commit a9120085 authored by 0xJMR's avatar 0xJMR
Browse files

Solves an issue with EOL characters.

parent e33c47b8
Pipeline #68998 failed with stages
in 1 minute and 59 seconds
......@@ -45,8 +45,8 @@ public class MathPrettyPrinterTest {
Log.info(message, "MathPrettyPrinterTest");
Optional<ASTMathCompilationUnit> astOptional = parser.parse(sourceModel.toString());
String input = FileUtils.readFileToString(targetModel, "UTF-8");
String output = printer.prettyPrint(astOptional.get());
String input = FileUtils.readFileToString(targetModel, "UTF-8").replaceAll("\\r\\n?", "\n");
String output = printer.prettyPrint(astOptional.get()).replaceAll("\\r\\n?", "\n");
assertEquals(input, output);
}
......
......@@ -5,7 +5,6 @@ import de.monticore.lang.math._parser.MathParser;
import de.se_rwth.commons.logging.Log;
import org.apache.commons.io.FileUtils;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
......@@ -45,8 +44,8 @@ public class TeXHTMLMathPrettyPrinterTest {
Log.info(message, "HTMLMathPrettyPrinterTest");
Optional<ASTMathCompilationUnit> astOptional = parser.parse(sourceModel.toString());
String input = FileUtils.readFileToString(targetModel, "UTF-8");
String output = printer.prettyPrint(astOptional.get());
String input = FileUtils.readFileToString(targetModel, "UTF-8").replaceAll("\\r\\n?", "\n");
String output = printer.prettyPrint(astOptional.get()).replaceAll("\\r\\n?", "\n");
assertEquals(input, output);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment