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

Unified Diff: test/global/run/runs_script_in_checked_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
« no previous file with comments | « lib/src/global_packages.dart ('k') | test/global/run/runs_script_in_unchecked_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/global/run/runs_script_in_checked_mode_test.dart
diff --git a/test/cache/repair/handles_corrupted_binstub_test.dart b/test/global/run/runs_script_in_checked_mode_test.dart
similarity index 58%
copy from test/cache/repair/handles_corrupted_binstub_test.dart
copy to test/global/run/runs_script_in_checked_mode_test.dart
index 4ba5ecd36fc2aa2e027c129a38fe344b719f4791..98fa94b3176346f736245cf41bded209af450228 100644
--- a/test/cache/repair/handles_corrupted_binstub_test.dart
+++ b/test/global/run/runs_script_in_checked_mode_test.dart
@@ -2,34 +2,27 @@
// 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 'dart:io';
-
import 'package:scheduled_test/scheduled_test.dart';
+import 'package:scheduled_test/scheduled_stream.dart';
import '../../descriptor.dart' as d;
import '../../test_pub.dart';
main() {
- integration('handles a corrupted binstub script', () {
+ integration('runs a script in checked mode', () {
servePackages((builder) {
builder.serve("foo", "1.0.0", contents: [
d.dir("bin", [
- d.file("script.dart", "main(args) => print('ok');")
+ d.file("script.dart", "main() { int a = true; }")
])
]);
});
schedulePub(args: ["global", "activate", "foo"]);
- d.dir(cachePath, [
- d.dir('bin', [
- d.file(binStubName('script'), 'junk')
- ])
- ]).create();
-
- schedulePub(args: ["cache", "repair"],
- error: contains('Error reading binstub for "script":'));
+ var pub = pubRun(global: true, args: ["--checked", "foo:script"]);
+ pub.stderr.expect(consumeThrough(contains(
+ "'bool' is not a subtype of type 'int' of 'a'")));
+ pub.shouldExit(255);
});
}
« no previous file with comments | « lib/src/global_packages.dart ('k') | test/global/run/runs_script_in_unchecked_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698