Index: tests/compiler/dart2js/dart2js_batch2_test.dart |
diff --git a/tests/compiler/dart2js/dart2js_batch_test.dart b/tests/compiler/dart2js/dart2js_batch2_test.dart |
similarity index 71% |
copy from tests/compiler/dart2js/dart2js_batch_test.dart |
copy to tests/compiler/dart2js/dart2js_batch2_test.dart |
index 8afe9e981dd7831555d73445e8adf01d5991ec3a..d2a1845614b6413462ad9401cd97dc128608bd0b 100644 |
--- a/tests/compiler/dart2js/dart2js_batch_test.dart |
+++ b/tests/compiler/dart2js/dart2js_batch2_test.dart |
@@ -37,11 +37,10 @@ Future<Directory> createTempDir() { |
Future setup() { |
return createTempDir().then((Directory directory) { |
tmpDir = directory; |
- Directory sunflowerDir = new Directory.fromUri( |
- Platform.script.resolve('../../../third_party/sunflower')); |
- |
- print("Copying '${sunflowerDir.path}' to '${tmpDir.path}'."); |
- copyDirectory(sunflowerDir, tmpDir); |
+ String newPath = path.join(directory.path, "dart2js_batch2_run.dart"); |
+ File source = |
+ new File(Platform.script.resolve("dart2js_batch2_run.dart").path); |
+ source.copySync(newPath); |
}); |
} |
@@ -60,30 +59,19 @@ Future launchDart2Js(_) { |
} |
Future runTests(Process process) { |
- String inFile = path.join(tmpDir.path, 'web/sunflower.dart'); |
+ String inFile = path.join(tmpDir.path, 'dart2js_batch2_run.dart'); |
String outFile = path.join(tmpDir.path, 'out.js'); |
- String outFile2 = path.join(tmpDir.path, 'out2.js'); |
process.stdin.writeln('--out="$outFile" "$inFile"'); |
- process.stdin.writeln('--out="$outFile2" "$inFile"'); |
- process.stdin.writeln('too many arguments'); |
- process.stdin.writeln(r'"non existing file.dart"'); |
process.stdin.close(); |
Future<String> output = process.stdout.transform(UTF8.decoder).join(); |
Future<String> errorOut = process.stderr.transform(UTF8.decoder).join(); |
return Future.wait([output, errorOut]) |
.then((result) { |
String stdoutOutput = result[0]; |
- print('out:\n$stdoutOutput'); |
String stderrOutput = result[1]; |
- print('err:\n$stderrOutput'); |
- |
- Expect.equals(4, ">>> EOF STDERR".allMatches(stderrOutput).length); |
- Expect.equals(4, ">>>".allMatches(stderrOutput).length); |
- Expect.equals(2, ">>> TEST OK".allMatches(stdoutOutput).length); |
- Expect.equals(2, ">>> TEST FAIL".allMatches(stdoutOutput).length); |
- Expect.equals(4, ">>>".allMatches(stdoutOutput).length); |
+ Expect.isFalse(stdoutOutput.contains("crashed")); |
}); |
} |