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

Side by Side Diff: test/run/does_not_run_on_transformer_error_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
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 main() { 9 main() {
10 print("should not get here!"); 10 print("should not get here!");
(...skipping 13 matching lines...) Expand all
24 void apply(Transform transform) { 24 void apply(Transform transform) {
25 // Don't run on the transformer itself. 25 // Don't run on the transformer itself.
26 if (transform.primaryInput.id.path.startsWith("lib")) return; 26 if (transform.primaryInput.id.path.startsWith("lib")) return;
27 transform.logger.error('\${transform.primaryInput.id}.'); 27 transform.logger.error('\${transform.primaryInput.id}.');
28 } 28 }
29 } 29 }
30 """; 30 """;
31 31
32 main() { 32 main() {
33 integration('does not run if a transformer has an error', () { 33 integration('does not run if a transformer has an error', () {
34 serveBarback();
35
34 d.dir(appPath, [ 36 d.dir(appPath, [
35 d.pubspec({ 37 d.pubspec({
36 "name": "myapp", 38 "name": "myapp",
37 "transformers": ["myapp/src/transformer"] 39 "transformers": ["myapp/src/transformer"],
40 "dependencies": {"barback": "any"}
38 }), 41 }),
39 d.dir("lib", [ 42 d.dir("lib", [
40 d.dir("src", [ 43 d.dir("src", [
41 d.file("transformer.dart", TRANSFORMER) 44 d.file("transformer.dart", TRANSFORMER)
42 ]) 45 ])
43 ]), 46 ]),
44 d.dir("bin", [ 47 d.dir("bin", [
45 d.file("script.dart", SCRIPT) 48 d.file("script.dart", SCRIPT)
46 ]) 49 ])
47 ]).create(); 50 ]).create();
48 51
49 createLockFile('myapp', pkg: ['barback']); 52 pubGet();
50
51 var pub = pubRun(args: ["bin/script"]); 53 var pub = pubRun(args: ["bin/script"]);
52 54
53 pub.stderr.expect("[Error from Failing]:"); 55 pub.stderr.expect("[Error from Failing]:");
54 pub.stderr.expect("myapp|bin/script.dart."); 56 pub.stderr.expect("myapp|bin/script.dart.");
55 57
56 // Note: no output from the script. 58 // Note: no output from the script.
57 pub.shouldExit(); 59 pub.shouldExit();
58 }); 60 });
59 } 61 }
OLDNEW
« no previous file with comments | « test/run/displays_transformer_logs_test.dart ('k') | test/run/doesnt_load_an_unnecessary_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698