| OLD | NEW |
| 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 library barback.test.package_graph.transform.pass_through_test; | 5 library barback.test.package_graph.transform.pass_through_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 expectAsset("app|foo.out", "bar"); | 245 expectAsset("app|foo.out", "bar"); |
| 246 | 246 |
| 247 manyToOne.pauseApply(); | 247 manyToOne.pauseApply(); |
| 248 updateSources(["app|bar.in"]); | 248 updateSources(["app|bar.in"]); |
| 249 expectAssetDoesNotComplete("app|foo.txt"); | 249 expectAssetDoesNotComplete("app|foo.txt"); |
| 250 | 250 |
| 251 manyToOne.resumeApply(); | 251 manyToOne.resumeApply(); |
| 252 expectAsset("app|foo.txt", "bar.in"); | 252 expectAsset("app|foo.txt", "bar.in"); |
| 253 buildShouldSucceed(); | 253 buildShouldSucceed(); |
| 254 }); | 254 }); |
| 255 | |
| 256 test("doesn't return an overwritten asset until we know it will still " | |
| 257 "be overwritten", () { | |
| 258 var rewrite = new RewriteTransformer("txt", "txt"); | |
| 259 initGraph(["app|foo.txt"], {"app": [[rewrite]]}); | |
| 260 | |
| 261 updateSources(["app|foo.txt"]); | |
| 262 expectAsset("app|foo.txt", "foo.txt"); | |
| 263 buildShouldSucceed(); | |
| 264 | |
| 265 rewrite.pauseIsPrimary("app|foo.txt"); | |
| 266 updateSources(["app|foo.txt"]); | |
| 267 expectAssetDoesNotComplete("app|foo.txt"); | |
| 268 | |
| 269 rewrite.resumeIsPrimary("app|foo.txt"); | |
| 270 expectAsset("app|foo.txt", "foo.txt"); | |
| 271 buildShouldSucceed(); | |
| 272 }); | |
| 273 } | 255 } |
| OLD | NEW |