Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/test/run/runs_app_in_directory_in_entrypoint_test.dart

Issue 330183003: Support paths outside of "bin" for pub run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test that root directory is served. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub/test/run/includes_parent_directories_of_entrypoint_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
});
}
« no previous file with comments | « sdk/lib/_internal/pub/test/run/includes_parent_directories_of_entrypoint_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine