Index: sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart |
diff --git a/sdk/lib/_internal/pub/test/run/runs_app_in_entrypoint_test.dart b/sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart |
similarity index 52% |
copy from sdk/lib/_internal/pub/test/run/runs_app_in_entrypoint_test.dart |
copy to sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart |
index f9a020922ec9e0d789b905cc999c4c935bd8f0bb..9eea7b63c8a3187f4fcf4d9e7219ab3f5913e6b8 100644 |
--- a/sdk/lib/_internal/pub/test/run/runs_app_in_entrypoint_test.dart |
+++ b/sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart |
@@ -2,33 +2,31 @@ |
// 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. |
+import 'package:path/path.dart' as path; |
+ |
import '../descriptor.dart' as d; |
import '../test_pub.dart'; |
import 'utils.dart'; |
-const SCRIPT = """ |
-import 'dart:io'; |
- |
-main() { |
- stdout.writeln("stdout output"); |
- stderr.writeln("stderr output"); |
- exitCode = 123; |
-} |
-"""; |
- |
main() { |
initConfig(); |
integration('runs a Dart application in the entrypoint package', () { |
d.dir(appPath, [ |
d.appPubspec(), |
- d.dir("bin", [ |
- d.file("script.dart", SCRIPT) |
+ d.dir("tool", [ |
+ d.file("app.dart", "main() => print('tool');"), |
+ d.dir("sub", [ |
+ d.file("app.dart", "main() => print('sub');") |
+ ]) |
]) |
]).create(); |
- var pub = pubRun(args: ["script"]); |
- pub.stdout.expect("stdout output"); |
- pub.stderr.expect("stderr output"); |
- pub.shouldExit(123); |
+ var pub = pubRun(args: [path.join("tool", "app")]); |
+ pub.stdout.expect("tool"); |
+ pub.shouldExit(); |
+ |
+ pub = pubRun(args: [path.join("tool", "sub", "app")]); |
+ pub.stdout.expect("sub"); |
+ pub.shouldExit(); |
}); |
} |