| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Process test program to test that invalid arguments throw exceptions. | 5 // Process test program to test that invalid arguments throw exceptions. |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | |
| 8 import "dart:io"; | 7 import "dart:io"; |
| 9 | 8 |
| 10 void main() { | 9 void main() { |
| 11 Expect.throws(() => Process.start(["true"], []), | 10 Expect.throws(() => Process.start(["true"], []), |
| 12 (e) => e is ArgumentError); | 11 (e) => e is ArgumentError); |
| 13 Expect.throws(() => Process.start("true", "asdf"), | 12 Expect.throws(() => Process.start("true", "asdf"), |
| 14 (e) => e is ArgumentError); | 13 (e) => e is ArgumentError); |
| 15 Expect.throws(() => Process.start("true", ["asdf", 1]), | 14 Expect.throws(() => Process.start("true", ["asdf", 1]), |
| 16 (e) => e is ArgumentError); | 15 (e) => e is ArgumentError); |
| 17 Expect.throws(() => Process.run(["true"], [], null), | 16 Expect.throws(() => Process.run(["true"], [], null), |
| (...skipping 10 matching lines...) Expand all Loading... |
| 28 (e) => e is ArgumentError); | 27 (e) => e is ArgumentError); |
| 29 options = new ProcessOptions(); | 28 options = new ProcessOptions(); |
| 30 options.stdoutEncoding = 23; | 29 options.stdoutEncoding = 23; |
| 31 Expect.throws(() => Process.run("true", [], options), | 30 Expect.throws(() => Process.run("true", [], options), |
| 32 (e) => e is ArgumentError); | 31 (e) => e is ArgumentError); |
| 33 options = new ProcessOptions(); | 32 options = new ProcessOptions(); |
| 34 options.stderrEncoding = 23; | 33 options.stderrEncoding = 23; |
| 35 Expect.throws(() => Process.run("true", [], options), | 34 Expect.throws(() => Process.run("true", [], options), |
| 36 (e) => e is ArgumentError); | 35 (e) => e is ArgumentError); |
| 37 } | 36 } |
| OLD | NEW |