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

Side by Side Diff: test/run/resource_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
« no previous file with comments | « test/run/mode_test.dart ('k') | test/run/runs_a_generated_script_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:path/path.dart' as p; 7 import 'package:path/path.dart' as p;
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;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 var pub = pubRun(args: ["bin/script"]); 89 var pub = pubRun(args: ["bin/script"]);
90 90
91 // TODO(nweiz): Enable this when sdk#23990 is fixed. 91 // TODO(nweiz): Enable this when sdk#23990 is fixed.
92 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "foo/lib/resource.txt"))); 92 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "foo/lib/resource.txt")));
93 93
94 pub.stdout.expect("hello!"); 94 pub.stdout.expect("hello!");
95 pub.shouldExit(0); 95 pub.shouldExit(0);
96 }); 96 });
97 97
98 integration('the spawned application can load a transformed resource', () { 98 integration('the spawned application can load a transformed resource', () {
99 serveBarback();
100
99 d.dir(appPath, [ 101 d.dir(appPath, [
100 d.pubspec({ 102 d.pubspec({
101 "name": "myapp", 103 "name": "myapp",
102 "transformers": ["myapp/src/transformer"] 104 "transformers": ["myapp/src/transformer"],
105 "dependencies": {"barback": "any"}
103 }), 106 }),
104 d.dir("lib", [ 107 d.dir("lib", [
105 d.file("resource.in", "hello!"), 108 d.file("resource.in", "hello!"),
106 d.dir("src", [ 109 d.dir("src", [
107 d.file("transformer.dart", TRANSFORMER) 110 d.file("transformer.dart", TRANSFORMER)
108 ]) 111 ])
109 ]), 112 ]),
110 d.dir("bin", [ 113 d.dir("bin", [
111 d.file("script.dart", """ 114 d.file("script.dart", """
112 main() async { 115 main() async {
113 var resource = new Resource("package:myapp/resource.txt"); 116 var resource = new Resource("package:myapp/resource.txt");
114 117
115 // TODO(nweiz): Enable this when sdk#23990 is fixed. 118 // TODO(nweiz): Enable this when sdk#23990 is fixed.
116 // print(resource.uri); 119 // print(resource.uri);
117 120
118 print(await resource.readAsString()); 121 print(await resource.readAsString());
119 } 122 }
120 """) 123 """)
121 ]) 124 ])
122 ]).create(); 125 ]).create();
123 126
124 createLockFile('myapp', pkg: ['barback']); 127 pubGet();
125
126 var pub = pubRun(args: ["bin/script"]); 128 var pub = pubRun(args: ["bin/script"]);
127 129
128 // TODO(nweiz): Enable this when sdk#23990 is fixed. 130 // TODO(nweiz): Enable this when sdk#23990 is fixed.
129 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt"))); 131 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "myapp/lib/resource.txt")));
130 132
131 pub.stdout.expect("hello!"); 133 pub.stdout.expect("hello!");
132 pub.shouldExit(0); 134 pub.shouldExit(0);
133 }); 135 });
134 136
135 integration('a snapshotted application can load a resource', () { 137 integration('a snapshotted application can load a resource', () {
(...skipping 27 matching lines...) Expand all
163 165
164 var pub = pubRun(args: ["foo:script"]); 166 var pub = pubRun(args: ["foo:script"]);
165 167
166 // TODO(nweiz): Enable this when sdk#23990 is fixed. 168 // TODO(nweiz): Enable this when sdk#23990 is fixed.
167 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "foo/lib/resource.txt"))); 169 // pub.stdout.expect(p.toUri(p.join(sandboxDir, "foo/lib/resource.txt")));
168 170
169 pub.stdout.expect("hello!"); 171 pub.stdout.expect("hello!");
170 pub.shouldExit(0); 172 pub.shouldExit(0);
171 }); 173 });
172 } 174 }
OLDNEW
« no previous file with comments | « test/run/mode_test.dart ('k') | test/run/runs_a_generated_script_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698