Chromium Code Reviews| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 245 }); | 245 }); |
| 246 | 246 |
| 247 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); | 247 updateSources(["pkg1|foo.txt", "pkg2|foo.inc"]); |
| 248 expectAsset("pkg1|foo.out", "foo.inc.inc"); | 248 expectAsset("pkg1|foo.out", "foo.inc.inc"); |
| 249 buildShouldSucceed(); | 249 buildShouldSucceed(); |
| 250 | 250 |
| 251 updateTransformers("pkg2", [[rewrite]]); | 251 updateTransformers("pkg2", [[rewrite]]); |
| 252 expectAsset("pkg1|foo.out", "foo.inc"); | 252 expectAsset("pkg1|foo.out", "foo.inc"); |
| 253 buildShouldSucceed(); | 253 buildShouldSucceed(); |
| 254 }); | 254 }); |
| 255 | |
| 256 // Regression test | |
|
Bob Nystrom
2013/09/05 00:09:55
Add a "."
nweiz
2013/09/05 00:13:09
Done.
| |
| 257 test("a phase is added, then an input is removed and re-added", () { | |
| 258 var rewrite = new RewriteTransformer("txt", "mid"); | |
| 259 initGraph(["app|foo.txt"], { | |
| 260 "app": [[rewrite]] | |
| 261 }); | |
| 262 | |
| 263 updateSources(["app|foo.txt"]); | |
| 264 expectAsset("app|foo.mid", "foo.mid"); | |
| 265 buildShouldSucceed(); | |
| 266 | |
| 267 updateTransformers("app", [ | |
| 268 [rewrite], | |
| 269 [new RewriteTransformer("mid", "out")] | |
| 270 ]); | |
| 271 expectAsset("app|foo.out", "foo.mid.out"); | |
| 272 buildShouldSucceed(); | |
| 273 | |
| 274 removeSources(["app|foo.txt"]); | |
| 275 expectNoAsset("app|foo.out"); | |
| 276 buildShouldSucceed(); | |
| 277 | |
| 278 updateSources(["app|foo.txt"]); | |
| 279 expectAsset("app|foo.out", "foo.mid.out"); | |
| 280 buildShouldSucceed(); | |
| 281 }); | |
| 255 } | 282 } |
| OLD | NEW |