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

Side by Side Diff: test/transformer/exclusion/works_on_dart2js_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 'package:scheduled_test/scheduled_stream.dart'; 7 import 'package:scheduled_test/scheduled_stream.dart';
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;
11 import '../../test_pub.dart'; 11 import '../../test_pub.dart';
12 import '../../serve/utils.dart'; 12 import '../../serve/utils.dart';
13 13
14 main() { 14 main() {
15 withBarbackVersions("any", () { 15 integration("works on the dart2js transformer", () {
16 integration("works on the dart2js transformer", () { 16 d.dir(appPath, [
17 d.dir(appPath, [ 17 d.pubspec({
18 d.pubspec({ 18 "name": "myapp",
19 "name": "myapp", 19 "transformers": [
20 "transformers": [ 20 {
21 { 21 "\$dart2js": {
22 "\$dart2js": { 22 "\$include": ["web/a.dart", "web/b.dart"],
23 "\$include": ["web/a.dart", "web/b.dart"], 23 "\$exclude": "web/a.dart"
24 "\$exclude": "web/a.dart"
25 }
26 } 24 }
27 ] 25 }
28 }), 26 ]
29 d.dir("web", [ 27 }),
30 d.file("a.dart", "void main() => print('hello');"), 28 d.dir("web", [
31 d.file("b.dart", "void main() => print('hello');"), 29 d.file("a.dart", "void main() => print('hello');"),
32 d.file("c.dart", "void main() => print('hello');") 30 d.file("b.dart", "void main() => print('hello');"),
33 ]) 31 d.file("c.dart", "void main() => print('hello');")
34 ]).create(); 32 ])
33 ]).create();
35 34
36 createLockFile('myapp', pkg: ['barback']); 35 createLockFile('myapp', pkg: ['barback']);
37 36
38 var server = pubServe(); 37 var server = pubServe();
39 // Dart2js should remain lazy. 38 // Dart2js should remain lazy.
40 server.stdout.expect("Build completed successfully"); 39 server.stdout.expect("Build completed successfully");
41 40
42 requestShould404("a.dart.js"); 41 requestShould404("a.dart.js");
43 requestShouldSucceed("b.dart.js", isNot(isEmpty)); 42 requestShouldSucceed("b.dart.js", isNot(isEmpty));
44 server.stdout.expect(consumeThrough(emitsLines( 43 server.stdout.expect(consumeThrough(emitsLines(
45 "[Info from Dart2JS]:\n" 44 "[Info from Dart2JS]:\n"
46 "Compiling myapp|web/b.dart..."))); 45 "Compiling myapp|web/b.dart...")));
47 server.stdout.expect(consumeThrough("Build completed successfully")); 46 server.stdout.expect(consumeThrough("Build completed successfully"));
48 47
49 requestShould404("c.dart.js"); 48 requestShould404("c.dart.js");
50 endPubServe(); 49 endPubServe();
51 });
52 }); 50 });
53 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698