| Index: sdk/lib/_internal/pub/test/transformer/dart2js/reads_nonpublic_files_from_disk_test.dart
|
| diff --git a/sdk/lib/_internal/pub/test/transformer/dart2js/allows_import_in_dart_code_test.dart b/sdk/lib/_internal/pub/test/transformer/dart2js/reads_nonpublic_files_from_disk_test.dart
|
| similarity index 59%
|
| copy from sdk/lib/_internal/pub/test/transformer/dart2js/allows_import_in_dart_code_test.dart
|
| copy to sdk/lib/_internal/pub/test/transformer/dart2js/reads_nonpublic_files_from_disk_test.dart
|
| index eb95620da47bc7cd52d238055088ed25c29bc950..982c45e3adaf74d5730d8c611d82ab9405a52888 100644
|
| --- a/sdk/lib/_internal/pub/test/transformer/dart2js/allows_import_in_dart_code_test.dart
|
| +++ b/sdk/lib/_internal/pub/test/transformer/dart2js/reads_nonpublic_files_from_disk_test.dart
|
| @@ -12,22 +12,14 @@ import '../../serve/utils.dart';
|
|
|
| main() {
|
| initConfig();
|
| - integration("handles imports in the Dart code", () {
|
| - d.dir("foo", [
|
| - d.libPubspec("foo", "0.0.1"),
|
| - d.dir("lib", [
|
| - d.file("foo.dart", """
|
| -library foo;
|
| -foo() => 'footext';
|
| -""")
|
| - ])
|
| - ]).create();
|
| -
|
| + integration("reads imported files from non-public directories straight from"
|
| + "the file system", () {
|
| + // Since the "private" directory isn't served by the barback server, the
|
| + // relative import for it will fail if the dart2js transformer tries to
|
| + // get it from barback. This is a regression test for dartbug.com/15688.
|
| d.dir(appPath, [
|
| - d.appPubspec({
|
| - "foo": {"path": "../foo"}
|
| - }),
|
| - d.dir("lib", [
|
| + d.appPubspec(),
|
| + d.dir("private", [
|
| d.file("lib.dart", """
|
| library lib;
|
| lib() => 'libtext';
|
| @@ -35,18 +27,15 @@ lib() => 'libtext';
|
| ]),
|
| d.dir("web", [
|
| d.file("main.dart", """
|
| -import 'package:foo/foo.dart';
|
| -import 'package:myapp/lib.dart';
|
| +import '../private/lib.dart';
|
| void main() {
|
| - print(foo());
|
| print(lib());
|
| }
|
| """)
|
| ])
|
| ]).create();
|
|
|
| - pubServe(shouldGetFirst: true);
|
| - requestShouldSucceed("main.dart.js", contains("footext"));
|
| + pubServe();
|
| requestShouldSucceed("main.dart.js", contains("libtext"));
|
| endPubServe();
|
| });
|
|
|