| Index: sdk/lib/_internal/pub/test/transformer/can_use_has_input_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart b/sdk/lib/_internal/pub/test/transformer/can_use_has_input_test.dart
|
| similarity index 69%
|
| copy from sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart
|
| copy to sdk/lib/_internal/pub/test/transformer/can_use_has_input_test.dart
|
| index fba1eed718ec25ea170930a19ddaa6b9f38e3393..543bf01f833e52d526d3e1356da90c82a576b9c2 100644
|
| --- a/sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/transformer/can_use_has_input_test.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file
|
| +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -19,10 +19,13 @@ class RewriteTransformer extends Transformer {
|
| String get allowedExtensions => '.txt';
|
|
|
| Future apply(Transform transform) {
|
| - return transform.readInput(transform.primaryInput.id).toList()
|
| - .then((contents) {
|
| + return Future.wait([
|
| + transform.hasInput(transform.primaryInput.id),
|
| + transform.hasInput(new AssetId('hooble', 'whatsit'))
|
| + ]).then((results) {
|
| var id = transform.primaryInput.id.changeExtension(".out");
|
| - var asset = new Asset.fromString(id, "\$contents.out");
|
| + var asset = new Asset.fromString(id,
|
| + "primary: \${results[0]}, secondary: \${results[1]}");
|
| transform.addOutput(asset);
|
| });
|
| }
|
| @@ -31,7 +34,7 @@ class RewriteTransformer extends Transformer {
|
|
|
| main() {
|
| initConfig();
|
| - integration("a transform can use readInputAsString", () {
|
| + integration("a transform can use hasInput", () {
|
| d.dir(appPath, [
|
| d.pubspec({
|
| "name": "myapp",
|
| @@ -48,7 +51,7 @@ main() {
|
| createLockFile('myapp', pkg: ['barback']);
|
|
|
| pubServe();
|
| - requestShouldSucceed("foo.out", "[[102, 111, 111]].out");
|
| + requestShouldSucceed("foo.out", "primary: true, secondary: false");
|
| endPubServe();
|
| });
|
| }
|
|
|