Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(443)

Side by Side Diff: sdk/lib/_internal/pub/test/run/passes_along_arguments_test.dart

Issue 354763006: Add a "pub global run" command. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 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 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 import '../descriptor.dart' as d; 5 import '../descriptor.dart' as d;
6 import '../test_pub.dart'; 6 import '../test_pub.dart';
7 import 'utils.dart';
8 7
9 const SCRIPT = """ 8 const SCRIPT = """
10 main(List<String> args) { 9 main(List<String> args) {
11 print(args.join(" ")); 10 print(args.join(" "));
12 } 11 }
13 """; 12 """;
14 13
15 main() { 14 main() {
16 initConfig(); 15 initConfig();
17 integration('passes arguments to the spawned script', () { 16 integration('passes arguments to the spawned script', () {
18 d.dir(appPath, [ 17 d.dir(appPath, [
19 d.appPubspec(), 18 d.appPubspec(),
20 d.dir("bin", [ 19 d.dir("bin", [
21 d.file("args.dart", SCRIPT) 20 d.file("args.dart", SCRIPT)
22 ]) 21 ])
23 ]).create(); 22 ]).create();
24 23
25 // Use some args that would trip up pub's arg parser to ensure that it 24 // Use some args that would trip up pub's arg parser to ensure that it
26 // isn't trying to look at them. 25 // isn't trying to look at them.
27 var pub = pubRun(args: ["args", "--verbose", "-m", "--", "help"]); 26 var pub = pubRun(args: ["args", "--verbose", "-m", "--", "help"]);
28 27
29 pub.stdout.expect("--verbose -m -- help"); 28 pub.stdout.expect("--verbose -m -- help");
30 pub.shouldExit(); 29 pub.shouldExit();
31 }); 30 });
32 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698