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 { private static void checkFilePrefixPostfix(@NotNull File file, @Nullable File prefix, @Nullable File postfix) throws IOException {
String fileContent = FileUtil.loadFile(file, true); String fileContent = FileUtil.loadFile(file, true);
String prefixContent = FileUtilsPackage.readTextOrEmpty(prefix); if (prefix != null) {
assertTrue(fileContent.startsWith(prefixContent)); String prefixContent = FileUtil.loadFile(prefix, true);
assertTrue(fileContent.startsWith(prefixContent));
}
String postfixContent = FileUtilsPackage.readTextOrEmpty(postfix); if (postfix != null) {
assertTrue(fileContent.endsWith(postfixContent)); String postfixContent = FileUtil.loadFile(postfix, true);
assertTrue(fileContent.endsWith(postfixContent));
}
} }
@Test @Test