Chromium Code Reviews| Index: tests/standalone/io/test_runner_exit_code_test.dart |
| diff --git a/tests/standalone/io/test_runner_exit_code_test.dart b/tests/standalone/io/test_runner_exit_code_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4e14991e3492da0c7ac98c0f35a759ecd9326c6a |
| --- /dev/null |
| +++ b/tests/standalone/io/test_runner_exit_code_test.dart |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +#import('dart:io'); |
| + |
| +void runTests(String executable, String script, Iterator iterator) { |
| + if (iterator.hasNext()) { |
| + Process.run(executable, [script, iterator.next()]).then((result) { |
|
ahe
2012/10/08 07:12:37
You should compare the string returned from iterat
Mads Ager (google)
2012/10/08 07:28:45
Done.
|
| + Expect.equals(1, result.exitCode); |
| + if (result.stdout.contains("@@@")) { |
| + Expect.isTrue(result.stdout.contains("@@@STEP_FAILURE@@@")); |
| + } |
| + runTests(executable, script, iterator); |
| + }); |
| + } |
| +} |
| + |
| +main() { |
| + var scriptPath = new Path.fromNative(new Options().script); |
| + var scriptDirPath = scriptPath.directoryPath; |
| + var exitCodeScriptPath = |
| + scriptDirPath.append('test_runner_exit_code_script.dart'); |
| + var script = exitCodeScriptPath.toNativePath(); |
| + var executable = new Options().executable; |
| + var progressTypes = ['compact', 'color', 'line', 'verbose', |
| + 'status', 'buildbot']; |
| + var iterator = progressTypes.iterator(); |
| + runTests(executable, script, iterator); |
| +} |