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

Side by Side Diff: test/global/run/mode_test.dart

Issue 1523323004: Install barback from a hosted source in all tests. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Merge for real. Created 5 years 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
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 11 matching lines...) Expand all
22 new AssetId(transform.primaryInput.id.package, "bin/script.dart"), 22 new AssetId(transform.primaryInput.id.package, "bin/script.dart"),
23 "void main() => print('\${_settings.mode.name}');")); 23 "void main() => print('\${_settings.mode.name}');"));
24 } 24 }
25 } 25 }
26 """; 26 """;
27 27
28 main() { 28 main() {
29 integration('runs a script in an activated package with customizable modes', 29 integration('runs a script in an activated package with customizable modes',
30 () { 30 () {
31 servePackages((builder) { 31 servePackages((builder) {
32 builder.serveRepoPackage("barback"); 32 builder.serveRealPackage("barback");
33 33
34 builder.serve("foo", "1.0.0", 34 builder.serve("foo", "1.0.0",
35 deps: {"barback": "any"}, 35 deps: {"barback": "any"},
36 pubspec: {"transformers": ["foo/src/transformer"]}, 36 pubspec: {"transformers": ["foo/src/transformer"]},
37 contents: [ 37 contents: [
38 d.dir("lib", [d.dir("src", [ 38 d.dir("lib", [d.dir("src", [
39 d.file("transformer.dart", TRANSFORMER), 39 d.file("transformer.dart", TRANSFORMER),
40 d.file("primary.in", "") 40 d.file("primary.in", "")
41 ])]) 41 ])])
42 ]); 42 ]);
43 }); 43 });
44 44
45 schedulePub(args: ["global", "activate", "foo"]); 45 schedulePub(args: ["global", "activate", "foo"]);
46 46
47 // By default it should run in release mode. 47 // By default it should run in release mode.
48 var pub = pubRun(global: true, args: ["foo:script"]); 48 var pub = pubRun(global: true, args: ["foo:script"]);
49 pub.stdout.expect("release"); 49 pub.stdout.expect("release");
50 pub.shouldExit(); 50 pub.shouldExit();
51 51
52 // A custom mode should be specifiable. 52 // A custom mode should be specifiable.
53 pub = pubRun(global: true, args: ["--mode", "custom-mode", "foo:script"]); 53 pub = pubRun(global: true, args: ["--mode", "custom-mode", "foo:script"]);
54 pub.stdout.expect("custom-mode"); 54 pub.stdout.expect("custom-mode");
55 pub.shouldExit(); 55 pub.shouldExit();
56 }); 56 });
57 } 57 }
OLDNEW
« no previous file with comments | « test/get/cache_transformed_dependency_test.dart ('k') | test/global/run/runs_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698