OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, 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 '../descriptor.dart' as d; |
| 6 import '../test_pub.dart'; |
| 7 import 'utils.dart'; |
| 8 |
| 9 const SCRIPT = """ |
| 10 main(List<String> args) { |
| 11 print(args.join(" ")); |
| 12 } |
| 13 """; |
| 14 |
| 15 main() { |
| 16 initConfig(); |
| 17 integration('passes arguments to the spawned script', () { |
| 18 d.dir(appPath, [ |
| 19 d.appPubspec(), |
| 20 d.dir("bin", [ |
| 21 d.file("args.dart", SCRIPT) |
| 22 ]) |
| 23 ]).create(); |
| 24 |
| 25 // Use some args that would trip up pub's arg parser to ensure that it |
| 26 // isn't trying to look at them. |
| 27 var pub = pubRun(args: ["args", "--verbose", "-m", "--", "help"]); |
| 28 |
| 29 pub.stdout.expect("--verbose -m -- help"); |
| 30 pub.shouldExit(); |
| 31 }); |
| 32 } |
OLD | NEW |