Fix smoke test.

This commit is contained in:
pTalanov
2012-05-02 17:20:53 +04:00
parent 359778906d
commit 9af091b715
2 changed files with 10 additions and 9 deletions
@@ -1,16 +1,16 @@
OUT Usage: org.jetbrains.jet.cli.jvm.K2JVMCompilerArguments OUT Usage: org.jetbrains.jet.cli.jvm.K2JVMCompilerArguments
OUT -output [String] output directory
OUT -jar [String] jar file name OUT -jar [String] jar file name
OUT -src [String] source file or directory OUT -src [String] source file or directory
OUT -module [String] module to compile
OUT -classpath [String] classpath to use when compiling OUT -classpath [String] classpath to use when compiling
OUT -includeRuntime [flag] OUT -includeRuntime [flag]
OUT -stdlib [String] Path to the stdlib.jar OUT -stdlib [String] Path to the stdlib.jar
OUT -jdkHeaders [String] Path to the kotlin-jdk-headers.jar OUT -jdkHeaders [String] Path to the kotlin-jdk-headers.jar
OUT -help (-h) [flag]
OUT -mode [String] Special compiler modes: stubs or jdkHeaders OUT -mode [String] Special compiler modes: stubs or jdkHeaders
OUT -output [String] output directory
OUT -module [String] module to compile
OUT -tags [flag] OUT -tags [flag]
OUT -verbose [flag] OUT -verbose [flag]
OUT -version [flag] OUT -version [flag]
OUT -help (-h) [flag]
ERR exec() finished with INTERNAL_ERROR return code ERR exec() finished with INTERNAL_ERROR return code
Return code: 2 Return code: 2
@@ -59,7 +59,8 @@ public abstract class KotlinIntegrationTestBase {
protected void succeeded(Description description) { protected void succeeded(Description description) {
try { try {
tempDir.delete(); tempDir.delete();
} catch (Exception e) { }
catch (Exception e) {
System.out.print("Can't delete temp directory " + tempDir + ": " + e); System.out.print("Can't delete temp directory " + tempDir + ": " + e);
} }
} }
@@ -119,12 +120,12 @@ public abstract class KotlinIntegrationTestBase {
} }
else { else {
final String goldContent = Files.toString(expectedFile, UTF_8); final String goldContent = Files.toString(expectedFile, UTF_8);
if (!goldContent.equals(content.toString())) { try {
Files.write(content, tmpFile, Charsets.UTF_8); assertEquals(goldContent, content.toString());
fail(".tmp and .expected files differ, tmp file: " + tmpFile); }
finally {
tmpFile.delete();
} }
tmpFile.delete();
} }
} }