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

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

Issue 301063002: First stab at "pub run" command. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add TODO. Created 6 years, 6 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/run/runs_the_script_in_checked_mode_test.dart
diff --git a/sdk/lib/_internal/pub/test/barback/fails_if_dir_arg_does_not_exist_test.dart b/sdk/lib/_internal/pub/test/run/runs_the_script_in_checked_mode_test.dart
similarity index 53%
copy from sdk/lib/_internal/pub/test/barback/fails_if_dir_arg_does_not_exist_test.dart
copy to sdk/lib/_internal/pub/test/run/runs_the_script_in_checked_mode_test.dart
index 2f5d56e9ac1427f4d7d620c90903c1bb625f42a9..fd6b27af9c707a69623fa08f72982d0ecb4f3492 100644
--- a/sdk/lib/_internal/pub/test/barback/fails_if_dir_arg_does_not_exist_test.dart
+++ b/sdk/lib/_internal/pub/test/run/runs_the_script_in_checked_mode_test.dart
@@ -1,28 +1,30 @@
-// Copyright (c) 2014, 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.
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';
+const SCRIPT = """
main() {
- initConfig();
+ int a = true;
+}
+""";
- setUp(() {
+main() {
+ initConfig();
+ integration('runs the script in checked mode by default', () {
d.dir(appPath, [
d.appPubspec(),
- d.dir("bar", [
- d.file("file.txt", "contents")
+ d.dir("bin", [
+ d.file("script.dart", SCRIPT)
])
]).create();
- });
- pubBuildAndServeShouldFail("if a specified directory doesn't exist",
- args: ["foo", "bar", "baz"],
- error: 'Directories "foo" and "baz" do not exist.',
- exitCode: exit_codes.DATA);
+ schedulePub(args: ["run", "script"],
+ error: contains("'bool' is not a subtype of type 'int' of 'a'"),
+ exitCode: 255);
+ });
}

Powered by Google App Engine
This is Rietveld 408576698