Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/run/runs_transformer_in_entrypoint_test.dart |
| diff --git a/sdk/lib/_internal/pub/test/transformer/runs_a_local_transform_on_the_application_package_test.dart b/sdk/lib/_internal/pub/test/run/runs_transformer_in_entrypoint_test.dart |
| similarity index 57% |
| copy from sdk/lib/_internal/pub/test/transformer/runs_a_local_transform_on_the_application_package_test.dart |
| copy to sdk/lib/_internal/pub/test/run/runs_transformer_in_entrypoint_test.dart |
| index 6412284d146d04346ca2300fb276040f61b78911..a8fdf08488a293de9c4616fdf8671d239c147ee6 100644 |
| --- a/sdk/lib/_internal/pub/test/transformer/runs_a_local_transform_on_the_application_package_test.dart |
| +++ b/sdk/lib/_internal/pub/test/run/runs_transformer_in_entrypoint_test.dart |
| @@ -1,35 +1,39 @@ |
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file |
| +// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS 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. |
| -library pub_tests; |
| - |
| import '../descriptor.dart' as d; |
| import '../test_pub.dart'; |
| import '../serve/utils.dart'; |
| +const SCRIPT = """ |
| +const TOKEN = "hi"; |
| +main() { |
| + print(TOKEN); |
| +} |
| +"""; |
| + |
| main() { |
| initConfig(); |
| withBarbackVersions("any", () { |
| - integration("runs a local transform on the application package", () { |
| + integration('runs a Dart application in the entrypoint package', () { |
|
nweiz
2014/05/29 19:30:09
Make the description match the filename.
Bob Nystrom
2014/05/30 18:17:47
Done.
|
| d.dir(appPath, [ |
| d.pubspec({ |
| "name": "myapp", |
| "transformers": ["myapp/src/transformer"] |
| }), |
| d.dir("lib", [d.dir("src", [ |
| - d.file("transformer.dart", REWRITE_TRANSFORMER) |
| + d.file("transformer.dart", dartTransformer("transformed")) |
| ])]), |
| - d.dir("web", [ |
| - d.file("foo.txt", "foo") |
| + d.dir("bin", [ |
| + d.file("hi.dart", SCRIPT) |
| ]) |
| ]).create(); |
| createLockFile('myapp', pkg: ['barback']); |
| - pubServe(); |
| - requestShouldSucceed("foo.out", "foo.out"); |
| - endPubServe(); |
| + schedulePub(args: ["run", "hi"], |
| + output: "(hi, transformed)"); |
| }); |
| }); |
| } |