Index: sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_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_consume_primary_test.dart |
similarity index 78% |
copy from sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart |
copy to sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_test.dart |
index fba1eed718ec25ea170930a19ddaa6b9f38e3393..9b41b2bbc5905412e31e2c3d02224973d5b1ff64 100644 |
--- a/sdk/lib/_internal/pub/test/transformer/can_use_read_input_test.dart |
+++ b/sdk/lib/_internal/pub/test/transformer/can_use_consume_primary_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,8 +19,8 @@ class RewriteTransformer extends Transformer { |
String get allowedExtensions => '.txt'; |
Future apply(Transform transform) { |
- return transform.readInput(transform.primaryInput.id).toList() |
- .then((contents) { |
+ transform.consumePrimary(); |
+ return transform.primaryInput.readAsString().then((contents) { |
var id = transform.primaryInput.id.changeExtension(".out"); |
var asset = new Asset.fromString(id, "\$contents.out"); |
transform.addOutput(asset); |
@@ -31,7 +31,7 @@ class RewriteTransformer extends Transformer { |
main() { |
initConfig(); |
- integration("a transform can use readInputAsString", () { |
+ integration("a transform can use consumePrimary", () { |
d.dir(appPath, [ |
d.pubspec({ |
"name": "myapp", |
@@ -48,7 +48,8 @@ main() { |
createLockFile('myapp', pkg: ['barback']); |
pubServe(); |
- requestShouldSucceed("foo.out", "[[102, 111, 111]].out"); |
+ requestShouldSucceed("foo.out", "foo.out"); |
+ requestShould404("foo.txt"); |
endPubServe(); |
}); |
} |