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

Side by Side Diff: test/snapshot/snapshots_transformed_code_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
« no previous file with comments | « test/snapshot/doesnt_load_irrelevant_transformers_test.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library pub_tests; 5 library pub_tests;
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 9
10 import '../descriptor.dart' as d; 10 import '../descriptor.dart' as d;
(...skipping 14 matching lines...) Expand all
25 transform.addOutput(new Asset.fromString(transform.primaryInput.id, 25 transform.addOutput(new Asset.fromString(transform.primaryInput.id,
26 contents.replaceAll("REPLACE ME", "hello!"))); 26 contents.replaceAll("REPLACE ME", "hello!")));
27 }); 27 });
28 } 28 }
29 } 29 }
30 """; 30 """;
31 31
32 main() { 32 main() {
33 integration("snapshots the transformed version of an executable", () { 33 integration("snapshots the transformed version of an executable", () {
34 servePackages((builder) { 34 servePackages((builder) {
35 builder.serveRepoPackage('barback'); 35 builder.serveRealPackage('barback');
36 36
37 builder.serve("foo", "1.2.3", 37 builder.serve("foo", "1.2.3",
38 deps: {"barback": "any"}, 38 deps: {"barback": "any"},
39 pubspec: {'transformers': ['foo']}, 39 pubspec: {'transformers': ['foo']},
40 contents: [ 40 contents: [
41 d.dir("lib", [d.file("foo.dart", REPLACE_TRANSFORMER)]), 41 d.dir("lib", [d.file("foo.dart", REPLACE_TRANSFORMER)]),
42 d.dir("bin", [ 42 d.dir("bin", [
43 d.file("hello.dart", """ 43 d.file("hello.dart", """
44 final message = 'REPLACE ME'; 44 final message = 'REPLACE ME';
45 45
46 void main() => print(message); 46 void main() => print(message);
47 """), 47 """),
48 ]) 48 ])
49 ]); 49 ]);
50 }); 50 });
51 51
52 d.appDir({"foo": "1.2.3"}).create(); 52 d.appDir({"foo": "1.2.3"}).create();
53 53
54 pubGet(output: contains("Precompiled foo:hello.")); 54 pubGet(output: contains("Precompiled foo:hello."));
55 55
56 d.dir(p.join(appPath, '.pub', 'bin'), [ 56 d.dir(p.join(appPath, '.pub', 'bin'), [
57 d.dir('foo', [d.matcherFile('hello.dart.snapshot', contains('hello!'))]) 57 d.dir('foo', [d.matcherFile('hello.dart.snapshot', contains('hello!'))])
58 ]).validate(); 58 ]).validate();
59 59
60 var process = pubRun(args: ['foo:hello']); 60 var process = pubRun(args: ['foo:hello']);
61 process.stdout.expect("hello!"); 61 process.stdout.expect("hello!");
62 process.shouldExit(); 62 process.shouldExit();
63 }); 63 });
64 } 64 }
OLDNEW
« no previous file with comments | « test/snapshot/doesnt_load_irrelevant_transformers_test.dart ('k') | test/test_pub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698