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

Unified Diff: test/global/run/runs_script_in_unchecked_mode_test.dart

Issue 1272813003: Support "--checked" in pub run and global run. (Closed) Base URL: https://github.com/dart-lang/pub.git@master
Patch Set: Revise. Created 5 years, 4 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: test/global/run/runs_script_in_unchecked_mode_test.dart
diff --git a/test/global/run/runs_script_test.dart b/test/global/run/runs_script_in_unchecked_mode_test.dart
similarity index 67%
copy from test/global/run/runs_script_test.dart
copy to test/global/run/runs_script_in_unchecked_mode_test.dart
index 808f9fb1f10642f487ee0ee6b331ec313fe1aaec..87ccc29b14d6fc965b8ca9238929ba077b76de7e 100644
--- a/test/global/run/runs_script_test.dart
+++ b/test/global/run/runs_script_in_unchecked_mode_test.dart
@@ -2,15 +2,24 @@
// 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 '../../descriptor.dart' as d;
import '../../test_pub.dart';
+const SCRIPT = """
+main() {
+ int a = true;
+ print("no checks");
+}
+""";
+
main() {
- integration('runs a script in an activated package', () {
+ integration('runs a script in unchecked mode by default', () {
servePackages((builder) {
builder.serve("foo", "1.0.0", contents: [
d.dir("bin", [
- d.file("script.dart", "main(args) => print('ok');")
+ d.file("script.dart", SCRIPT)
])
]);
});
@@ -18,7 +27,7 @@ main() {
schedulePub(args: ["global", "activate", "foo"]);
var pub = pubRun(global: true, args: ["foo:script"]);
- pub.stdout.expect("ok");
+ pub.stdout.expect("no checks");
pub.shouldExit();
});
}
« no previous file with comments | « test/global/run/runs_script_in_checked_mode_test.dart ('k') | test/run/runs_the_script_in_checked_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698