Do the check with converted line separators

This commit is contained in:
Nikolay Krasko
2014-10-31 17:43:55 +03:00
committed by Zalim Bashorov
parent 775fddbf73
commit ec2613db72
@@ -65,11 +65,15 @@ public class AntTaskJsTest extends AntTaskBaseTest {
private static void checkFilePrefixPostfix(@NotNull File file, @Nullable File prefix, @Nullable File postfix) throws IOException {
String fileContent = FileUtil.loadFile(file, true);
String prefixContent = FileUtilsPackage.readTextOrEmpty(prefix);
assertTrue(fileContent.startsWith(prefixContent));
if (prefix != null) {
String prefixContent = FileUtil.loadFile(prefix, true);
assertTrue(fileContent.startsWith(prefixContent));
}
String postfixContent = FileUtilsPackage.readTextOrEmpty(postfix);
assertTrue(fileContent.endsWith(postfixContent));
if (postfix != null) {
String postfixContent = FileUtil.loadFile(postfix, true);
assertTrue(fileContent.endsWith(postfixContent));
}
}
@Test