Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart

Issue 167103003: Support serving from multiple directories using "pub serve". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
diff --git a/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..440043b742b7cb193cd0a7bb1e5600227be2af5b
--- /dev/null
+++ b/sdk/lib/_internal/pub/test/serve/roots/throws_an_error_if_custom_roots_dont_exist_test.dart
@@ -0,0 +1,26 @@
+// 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.
+
+library pub_tests;
+
+import 'package:scheduled_test/scheduled_test.dart';
+
+import '../../../lib/src/exit_codes.dart' as exit_codes;
+
+import '../../descriptor.dart' as d;
+import '../../test_pub.dart';
+import '../utils.dart';
+
+main() {
+ initConfig();
+ integration("throws an error if custom roots don't exist", () {
Bob Nystrom 2014/02/19 00:36:52 Is this the behavior we want? What if the user fir
nweiz 2014/02/19 01:25:58 The watcher package doesn't support that. We curre
Bob Nystrom 2014/02/19 01:50:55 Ah good point. Let's not worry about that then.
+ d.dir(appPath, [
+ d.appPubspec()
+ ]).create();
+
+ var server = startPubServe(args: ["foo", "bar"]);
Bob Nystrom 2014/02/19 00:36:52 Add a third directory that does exist to ensure th
nweiz 2014/02/19 01:25:58 Done.
+ server.stderr.expect('Directories "bar/" and "foo/" don\'t exist.');
Bob Nystrom 2014/02/19 00:36:52 Remove the "/" from the names. We don't use them w
nweiz 2014/02/19 01:25:58 Done.
+ server.shouldExit(exit_codes.USAGE);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698