| Index: third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
|
| diff --git a/pkg/barback/test/package_graph/transform/cross_package_test.dart b/third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
|
| similarity index 85%
|
| copy from pkg/barback/test/package_graph/transform/cross_package_test.dart
|
| copy to third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
|
| index b499604680d968d767eb3ad36e6d30af09b0a8c6..6aaf58515536c246cdc35d4823188a2fd478a3d7 100644
|
| --- a/pkg/barback/test/package_graph/transform/cross_package_test.dart
|
| +++ b/third_party/pkg/barback-0.13.0/test/package_graph/transform/cross_package_test.dart
|
| @@ -190,4 +190,37 @@ main() {
|
| expectAsset("pkg1|a.out", "b");
|
| buildShouldSucceed();
|
| });
|
| +
|
| + test("re-runs if the primary input is invalidated before accessing", () {
|
| + var transformer1 = new RewriteTransformer("txt", "mid");
|
| + var transformer2 = new RewriteTransformer("mid", "out");
|
| +
|
| + initGraph([
|
| + "app|foo.txt"
|
| + ], {"app": [
|
| + [transformer1],
|
| + [transformer2]
|
| + ]});
|
| +
|
| + transformer2.pausePrimaryInput();
|
| + updateSources(["app|foo.txt"]);
|
| +
|
| + // Wait long enough to ensure that transformer1 has completed and
|
| + // transformer2 has started.
|
| + schedule(pumpEventQueue);
|
| +
|
| + // Update the source again so that transformer1 invalidates the primary
|
| + // input of transformer2.
|
| + transformer1.pauseApply();
|
| + updateSources(["app|foo.txt"]);
|
| +
|
| + transformer2.resumePrimaryInput();
|
| + transformer1.resumeApply();
|
| +
|
| + expectAsset("app|foo.out", "foo.mid.out");
|
| + buildShouldSucceed();
|
| +
|
| + expect(transformer1.numRuns, completion(equals(2)));
|
| + expect(transformer2.numRuns, completion(equals(2)));
|
| + });
|
| }
|
|
|