| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library barback.test.package_graph.transform_test; | 5 library barback.test.package_graph.transform_test; |
| 6 | 6 |
| 7 import 'package:barback/src/utils.dart'; | 7 import 'package:barback/src/utils.dart'; |
| 8 import 'package:scheduled_test/scheduled_test.dart'; | 8 import 'package:scheduled_test/scheduled_test.dart'; |
| 9 | 9 |
| 10 import '../utils.dart'; | 10 import '../utils.dart'; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 updateTransformers("app", [ | 184 updateTransformers("app", [ |
| 185 [rewrite], | 185 [rewrite], |
| 186 [new RewriteTransformer("blub", "blab")] | 186 [new RewriteTransformer("blub", "blab")] |
| 187 ]); | 187 ]); |
| 188 expectAsset("app|foo.blab", "foo.blab"); | 188 expectAsset("app|foo.blab", "foo.blab"); |
| 189 expectNoAsset("app|foo.blub"); | 189 expectNoAsset("app|foo.blub"); |
| 190 buildShouldSucceed(); | 190 buildShouldSucceed(); |
| 191 }); | 191 }); |
| 192 | 192 |
| 193 test("a cross-package transform sees a new transformer in a new phase", () { | 193 test("a cross-package transform sees a new transformer in a new phase", () { |
| 194 // TODO(nweiz): make this work. | |
| 195 return; | |
| 196 | |
| 197 var rewrite = new RewriteTransformer("inc", "inc"); | 194 var rewrite = new RewriteTransformer("inc", "inc"); |
| 198 initGraph({ | 195 initGraph({ |
| 199 "pkg1|foo.txt": "pkg2|foo.inc", | 196 "pkg1|foo.txt": "pkg2|foo.inc", |
| 200 "pkg2|foo.inc": "foo" | 197 "pkg2|foo.inc": "foo" |
| 201 }, { | 198 }, { |
| 202 "pkg1": [[new ManyToOneTransformer("txt")]], | 199 "pkg1": [[new ManyToOneTransformer("txt")]], |
| 203 "pkg2": [[rewrite]] | 200 "pkg2": [[rewrite]] |
| 204 }); | 201 }); |
| 205 | 202 |
| 206 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); | 203 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); |
| 207 expectAsset("pkg1|foo.out", "foo"); | 204 expectAsset("pkg1|foo.out", "foo.inc"); |
| 208 buildShouldSucceed(); | 205 buildShouldSucceed(); |
| 209 | 206 |
| 210 updateTransformers("pkg2", [ | 207 updateTransformers("pkg2", [ |
| 211 [rewrite], | 208 [rewrite], |
| 212 [new RewriteTransformer("inc", "inc")] | 209 [new RewriteTransformer("inc", "inc")] |
| 213 ]); | 210 ]); |
| 214 expectAsset("pkg1|foo.out", "foo.inc.inc"); | 211 expectAsset("pkg1|foo.out", "foo.inc.inc"); |
| 215 buildShouldSucceed(); | 212 buildShouldSucceed(); |
| 216 }); | 213 }); |
| 217 | 214 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 231 | 228 |
| 232 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); | 229 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); |
| 233 expectAsset("pkg1|foo.out", "foo.inc.inc"); | 230 expectAsset("pkg1|foo.out", "foo.inc.inc"); |
| 234 buildShouldSucceed(); | 231 buildShouldSucceed(); |
| 235 | 232 |
| 236 updateTransformers("pkg2", [[rewrite]]); | 233 updateTransformers("pkg2", [[rewrite]]); |
| 237 expectAsset("pkg1|foo.out", "foo.inc"); | 234 expectAsset("pkg1|foo.out", "foo.inc"); |
| 238 buildShouldSucceed(); | 235 buildShouldSucceed(); |
| 239 }); | 236 }); |
| 240 } | 237 } |
| OLD | NEW |