Fix line separators for windows in tests

This commit is contained in:
Natalia Ukhorskaya
2014-03-07 17:14:38 +04:00
parent 1fdd3bd615
commit d9d045cbb2
35 changed files with 45 additions and 45 deletions
@@ -84,12 +84,12 @@ public final class OutputPrefixPostfixTest extends SingleFileTranslationTest {
super.runFunctionOutputTest(ecmaVersions, kotlinFilename, packageName, functionName, expectedResult);
for (EcmaVersion ecmaVersion : ecmaVersions) {
String output = FileUtil.loadFile(new File(getOutputFilePath(filename, ecmaVersion)));
String output = FileUtil.loadFile(new File(getOutputFilePath(filename, ecmaVersion)), true);
if (outputPrefixFile != null) {
assertTrue(output.startsWith(FileUtil.loadFile(outputPrefixFile)));
assertTrue(output.startsWith(FileUtil.loadFile(outputPrefixFile, true)));
}
if (outputPostfixFile != null) {
assertTrue(output.endsWith(FileUtil.loadFile(outputPostfixFile)));
assertTrue(output.endsWith(FileUtil.loadFile(outputPostfixFile, true)));
}
}
}
@@ -96,7 +96,7 @@ public final class RhinoUtils {
@NotNull Scriptable scope) throws Exception {
String result;
try {
result = FileUtil.loadFile(new File(inputFile));
result = FileUtil.loadFile(new File(inputFile), true);
}
catch (IOException e) {
throw new RuntimeException(e);
@@ -224,7 +224,7 @@ public final class RhinoUtils {
return null;
}
Object[] args = {FileUtil.loadFile(new File(fileName)), JSHINT_OPTIONS};
Object[] args = {FileUtil.loadFile(new File(fileName), true), JSHINT_OPTIONS};
Function function = (Function) ScriptableObject.getProperty(scope.getParentScope(), "JSHINT");
Object status = function.call(context, scope.getParentScope(), scope.getParentScope(), args);
if (!(Boolean) Context.jsToJava(status, Boolean.class)) {
@@ -71,7 +71,7 @@ public abstract class InlineTest extends SingleFileTranslationTest {
private void checkFooBoxIsTrueAndFunctionNameIsNotReferenced(@NotNull String filename, String funName) throws Exception {
fooBoxTest();
String generatedJSFilePath = getOutputFilePath(filename, EcmaVersion.defaultVersion());
String outputFileText = FileUtil.loadFile(new File(generatedJSFilePath));
String outputFileText = FileUtil.loadFile(new File(generatedJSFilePath), true);
assertTrue(countOccurrences(outputFileText, funName) == 1);
}
@@ -146,7 +146,7 @@ public final class TranslationUtils {
for (String libFileName : list) {
try {
String path = root == null ? libFileName : (root + libFileName);
String text = FileUtil.loadFile(new File(path));
String text = FileUtil.loadFile(new File(path), true);
JetFile jetFile = JetFileUtils.createJetFile(path, text, project);
libFiles.add(jetFile);
}