| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 #import("dart:io"); |
| 6 #source("ProcessTestUtil.dart"); |
| 7 |
| 8 test(args) { |
| 9 Process process = new Process.start(getDartFileName(), args); |
| 10 // Wait for the process to exit and then check result. |
| 11 process.onExit = (exitCode) { |
| 12 Expect.equals(0, exitCode); |
| 13 process.close(); |
| 14 }; |
| 15 } |
| 16 |
| 17 main() { |
| 18 // Get the Dart script file which checks arguments. |
| 19 var scriptFile = |
| 20 new File("tests/standalone/src/io/ProcessCheckArgumentsScript.dart"); |
| 21 if (!scriptFile.existsSync()) { |
| 22 scriptFile = |
| 23 new File("../tests/standalone/src/io/ProcessCheckArgumentsScript.dart"); |
| 24 } |
| 25 test([scriptFile.name, '3', '0', 'a']); |
| 26 test([scriptFile.name, '3', '0', 'a b']); |
| 27 test([scriptFile.name, '3', '0', 'a\tb']); |
| 28 test([scriptFile.name, '3', '1', 'a\tb"']); |
| 29 test([scriptFile.name, '3', '1', 'a"\tb']); |
| 30 test([scriptFile.name, '3', '1', 'a"\t\\\\"b"']); |
| 31 test([scriptFile.name, '4', '0', 'a\tb', 'a']); |
| 32 test([scriptFile.name, '4', '0', 'a\tb', 'a\t\t\t\tb']); |
| 33 test([scriptFile.name, '4', '0', 'a\tb', 'a b']); |
| 34 } |
| 35 |
| OLD | NEW |