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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library pub_tests;
6
7 import 'dart:io';
8
9 import 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 import 'package:scheduled_test/scheduled_stream.dart';
10 7
11 import '../../descriptor.dart' as d; 8 import '../../descriptor.dart' as d;
12 import '../../test_pub.dart'; 9 import '../../test_pub.dart';
13 10
14 main() { 11 main() {
15 integration('handles a corrupted binstub script', () { 12 integration('runs a script in checked mode', () {
16 servePackages((builder) { 13 servePackages((builder) {
17 builder.serve("foo", "1.0.0", contents: [ 14 builder.serve("foo", "1.0.0", contents: [
18 d.dir("bin", [ 15 d.dir("bin", [
19 d.file("script.dart", "main(args) => print('ok');") 16 d.file("script.dart", "main() { int a = true; }")
20 ]) 17 ])
21 ]); 18 ]);
22 }); 19 });
23 20
24 schedulePub(args: ["global", "activate", "foo"]); 21 schedulePub(args: ["global", "activate", "foo"]);
25 22
26 d.dir(cachePath, [ 23 var pub = pubRun(global: true, args: ["--checked", "foo:script"]);
27 d.dir('bin', [ 24 pub.stderr.expect(consumeThrough(contains(
28 d.file(binStubName('script'), 'junk') 25 "'bool' is not a subtype of type 'int' of 'a'")));
29 ]) 26 pub.shouldExit(255);
30 ]).create();
31
32 schedulePub(args: ["cache", "repair"],
33 error: contains('Error reading binstub for "script":'));
34 }); 27 });
35 } 28 }
OLDNEW
« 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