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

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

Issue 1040563004: Make "pub run foo" run "pub run foo:foo" rather than "pub run bin/foo" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bogus changes. Created 5 years, 8 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 7
8 const TRANSFORMER = """ 8 const TRANSFORMER = """
9 import 'dart:async'; 9 import 'dart:async';
10 10
(...skipping 25 matching lines...) Expand all
36 }), 36 }),
37 d.dir("lib", [d.dir("src", [ 37 d.dir("lib", [d.dir("src", [
38 d.file("transformer.dart", TRANSFORMER), 38 d.file("transformer.dart", TRANSFORMER),
39 d.file("primary.in", "") 39 d.file("primary.in", "")
40 ])]) 40 ])])
41 ]).create(); 41 ]).create();
42 42
43 createLockFile('myapp', pkg: ['barback']); 43 createLockFile('myapp', pkg: ['barback']);
44 44
45 // By default it should run in debug mode. 45 // By default it should run in debug mode.
46 var pub = pubRun(args: ["script"]); 46 var pub = pubRun(args: ["bin/script"]);
47 pub.stdout.expect("debug"); 47 pub.stdout.expect("debug");
48 pub.shouldExit(); 48 pub.shouldExit();
49 49
50 // A custom mode should be specifiable. 50 // A custom mode should be specifiable.
51 pub = pubRun(args: ["--mode", "custom-mode", "script"]); 51 pub = pubRun(args: ["--mode", "custom-mode", "bin/script"]);
52 pub.stdout.expect("custom-mode"); 52 pub.stdout.expect("custom-mode");
53 pub.shouldExit(); 53 pub.shouldExit();
54 }); 54 });
55 55
56 integration('runs a dependency script with customizable modes', () { 56 integration('runs a dependency script with customizable modes', () {
57 d.dir("foo", [ 57 d.dir("foo", [
58 d.pubspec({ 58 d.pubspec({
59 "name": "foo", 59 "name": "foo",
60 "version": "1.2.3", 60 "version": "1.2.3",
61 "transformers": ["foo/src/transformer"] 61 "transformers": ["foo/src/transformer"]
(...skipping 13 matching lines...) Expand all
75 pub.stdout.expect("release"); 75 pub.stdout.expect("release");
76 pub.shouldExit(); 76 pub.shouldExit();
77 77
78 // A custom mode should be specifiable. 78 // A custom mode should be specifiable.
79 pub = pubRun(args: ["--mode", "custom-mode", "foo:script"]); 79 pub = pubRun(args: ["--mode", "custom-mode", "foo:script"]);
80 pub.stdout.expect("custom-mode"); 80 pub.stdout.expect("custom-mode");
81 pub.shouldExit(); 81 pub.shouldExit();
82 }); 82 });
83 }); 83 });
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698