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

Side by Side Diff: test/run/displays_transformer_logs_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 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 SCRIPT = """ 8 const SCRIPT = """
9 import "package:myapp/lib.dart"; 9 import "package:myapp/lib.dart";
10 main() { 10 main() {
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 void declareOutputs(DeclaringTransform transform) { 40 void declareOutputs(DeclaringTransform transform) {
41 // TODO(rnystrom): Remove this when #19408 is fixed. 41 // TODO(rnystrom): Remove this when #19408 is fixed.
42 transform.declareOutput(transform.primaryId); 42 transform.declareOutput(transform.primaryId);
43 } 43 }
44 } 44 }
45 """; 45 """;
46 46
47 main() { 47 main() {
48 withBarbackVersions("any", () { 48 integration('displays transformer log messages', () {
49 integration('displays transformer log messages', () { 49 d.dir(appPath, [
50 d.dir(appPath, [ 50 d.pubspec({
51 d.pubspec({ 51 "name": "myapp",
52 "name": "myapp", 52 "transformers": ["myapp/src/transformer"]
53 "transformers": ["myapp/src/transformer"] 53 }),
54 }), 54 d.dir("lib", [
55 d.dir("lib", [ 55 d.file("lib.dart", LIB),
56 d.file("lib.dart", LIB), 56 d.dir("src", [
57 d.dir("src", [ 57 d.file("transformer.dart", TRANSFORMER)
58 d.file("transformer.dart", TRANSFORMER)
59 ])
60 ]),
61 d.dir("bin", [
62 d.file("script.dart", SCRIPT)
63 ]) 58 ])
64 ]).create(); 59 ]),
60 d.dir("bin", [
61 d.file("script.dart", SCRIPT)
62 ])
63 ]).create();
65 64
66 createLockFile('myapp', pkg: ['barback']); 65 createLockFile('myapp', pkg: ['barback']);
67 66
68 var pub = pubRun(args: ["bin/script"]); 67 var pub = pubRun(args: ["bin/script"]);
69 68
70 // Note that the info log is only displayed here because the test 69 // Note that the info log is only displayed here because the test
71 // harness runs pub in verbose mode. By default, only the warning would 70 // harness runs pub in verbose mode. By default, only the warning would
72 // be shown. 71 // be shown.
73 pub.stdout.expect("[Info from Logging]:"); 72 pub.stdout.expect("[Info from Logging]:");
74 pub.stdout.expect("myapp|bin/script.dart."); 73 pub.stdout.expect("myapp|bin/script.dart.");
75 74
76 pub.stderr.expect("[Warning from Logging]:"); 75 pub.stderr.expect("[Warning from Logging]:");
77 pub.stderr.expect("myapp|bin/script.dart."); 76 pub.stderr.expect("myapp|bin/script.dart.");
78 77
79 pub.stdout.expect("[Info from Logging]:"); 78 pub.stdout.expect("[Info from Logging]:");
80 pub.stdout.expect("myapp|lib/lib.dart."); 79 pub.stdout.expect("myapp|lib/lib.dart.");
81 80
82 pub.stderr.expect("[Warning from Logging]:"); 81 pub.stderr.expect("[Warning from Logging]:");
83 pub.stderr.expect("myapp|lib/lib.dart."); 82 pub.stderr.expect("myapp|lib/lib.dart.");
84 83
85 pub.stdout.expect("lib"); 84 pub.stdout.expect("lib");
86 pub.shouldExit(); 85 pub.shouldExit();
87 });
88 }); 86 });
89 } 87 }
OLDNEW
« no previous file with comments | « test/global/run/runs_transformer_test.dart ('k') | test/run/does_not_run_on_transformer_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698