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

Side by Side Diff: test/transformer/asset_not_found_exceptions_are_detectable_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 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:scheduled_test/scheduled_stream.dart'; 9 import 'package:scheduled_test/scheduled_stream.dart';
10 10
(...skipping 20 matching lines...) Expand all
31 JSON.encode({ 31 JSON.encode({
32 'package': error.id.package, 32 'package': error.id.package,
33 'path': error.id.path 33 'path': error.id.path
34 }))); 34 })));
35 }); 35 });
36 } 36 }
37 } 37 }
38 """; 38 """;
39 39
40 main() { 40 main() {
41 withBarbackVersions("any", () { 41 integration("AssetNotFoundExceptions are detectable", () {
42 integration("AssetNotFoundExceptions are detectable", () { 42 d.dir(appPath, [
43 d.dir(appPath, [ 43 d.pubspec({
44 d.pubspec({ 44 "name": "myapp",
45 "name": "myapp", 45 "transformers": ["myapp/src/transformer"]
46 "transformers": ["myapp/src/transformer"] 46 }),
47 }), 47 d.dir("lib", [d.dir("src", [
48 d.dir("lib", [d.dir("src", [ 48 d.file("transformer.dart", transformer)
49 d.file("transformer.dart", transformer) 49 ])]),
50 ])]), 50 d.dir("web", [
51 d.dir("web", [ 51 d.file("foo.txt", "foo")
52 d.file("foo.txt", "foo") 52 ])
53 ]) 53 ]).create();
54 ]).create();
55 54
56 createLockFile('myapp', pkg: ['barback']); 55 createLockFile('myapp', pkg: ['barback']);
57 56
58 var server = pubServe(); 57 var server = pubServe();
59 requestShouldSucceed("foo.txt", JSON.encode({ 58 requestShouldSucceed("foo.txt", JSON.encode({
60 "package": "myapp", 59 "package": "myapp",
61 "path": "nonexistent" 60 "path": "nonexistent"
62 })); 61 }));
63 endPubServe(); 62 endPubServe();
64 63
65 // Since the AssetNotFoundException was caught and handled, the server 64 // Since the AssetNotFoundException was caught and handled, the server
66 // shouldn't print any error information for it. 65 // shouldn't print any error information for it.
67 server.stderr.expect(isDone); 66 server.stderr.expect(isDone);
68 });
69 }); 67 });
70 } 68 }
OLDNEW
« no previous file with comments | « test/transformer/a_transformer_rejects_its_config_test.dart ('k') | test/transformer/can_log_messages_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698