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

Side by Side Diff: test/serve/supports_user_defined_declaring_transformers_test.dart

Issue 1530353002: Drop support for older Barback versions. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: 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 d.file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.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 '../descriptor.dart' as d; 7 import '../descriptor.dart' as d;
8 import '../test_pub.dart'; 8 import '../test_pub.dart';
9 import 'utils.dart'; 9 import 'utils.dart';
10 10
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 29
30 Future declareOutputs(DeclaringTransform transform) { 30 Future declareOutputs(DeclaringTransform transform) {
31 transform.declareOutput(transform.primaryId.changeExtension(".final")); 31 transform.declareOutput(transform.primaryId.changeExtension(".final"));
32 return new Future.value(); 32 return new Future.value();
33 } 33 }
34 } 34 }
35 """; 35 """;
36 36
37 main() { 37 main() {
38 withBarbackVersions("any", () { 38 integration("supports a user-defined declaring transformer", () {
39 integration("supports a user-defined declaring transformer", () { 39 d.dir(appPath, [
40 d.dir(appPath, [ 40 d.pubspec({
41 d.pubspec({ 41 "name": "myapp",
42 "name": "myapp", 42 "transformers": ["myapp/src/lazy", "myapp/src/declaring"]
43 "transformers": ["myapp/src/lazy", "myapp/src/declaring"] 43 }),
44 }), 44 d.dir("lib", [d.dir("src", [
45 d.dir("lib", [d.dir("src", [ 45 // Include a lazy transformer before the declaring transformer,
46 // Include a lazy transformer before the declaring transformer, 46 // because otherwise its behavior is indistinguishable from a normal
47 // because otherwise its behavior is indistinguishable from a normal 47 // transformer.
48 // transformer. 48 d.file("lazy.dart", LAZY_TRANSFORMER),
49 d.file("lazy.dart", LAZY_TRANSFORMER), 49 d.file("declaring.dart", DECLARING_TRANSFORMER)
50 d.file("declaring.dart", DECLARING_TRANSFORMER) 50 ])]),
51 ])]), 51 d.dir("web", [
52 d.dir("web", [ 52 d.file("foo.txt", "foo")
53 d.file("foo.txt", "foo") 53 ])
54 ]) 54 ]).create();
55 ]).create();
56 55
57 createLockFile('myapp', pkg: ['barback']); 56 createLockFile('myapp', pkg: ['barback']);
58 57
59 var server = pubServe(); 58 var server = pubServe();
60 // The build should complete without either transformer logging anything. 59 // The build should complete without either transformer logging anything.
61 server.stdout.expect('Build completed successfully'); 60 server.stdout.expect('Build completed successfully');
62 61
63 requestShouldSucceed("foo.final", "foo.out.final"); 62 requestShouldSucceed("foo.final", "foo.out.final");
64 server.stdout.expect(emitsLines( 63 server.stdout.expect(emitsLines(
65 '[Info from LazyRewrite]:\n' 64 '[Info from LazyRewrite]:\n'
66 'Rewriting myapp|web/foo.txt.\n' 65 'Rewriting myapp|web/foo.txt.\n'
67 '[Info from DeclaringRewrite]:\n' 66 '[Info from DeclaringRewrite]:\n'
68 'Rewriting myapp|web/foo.out.')); 67 'Rewriting myapp|web/foo.out.'));
69 endPubServe(); 68 endPubServe();
70 });
71 }); 69 });
72 } 70 }
OLDNEW
« no previous file with comments | « test/serve/native_watch_replaced_file_test.dart ('k') | test/serve/supports_user_defined_lazy_transformers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698