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

Side by Side 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 unified diff | Download patch
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 import 'package:scheduled_test/scheduled_test.dart';
6
5 import '../../descriptor.dart' as d; 7 import '../../descriptor.dart' as d;
6 import '../../test_pub.dart'; 8 import '../../test_pub.dart';
7 9
10 const SCRIPT = """
8 main() { 11 main() {
9 integration('runs a script in an activated package', () { 12 int a = true;
13 print("no checks");
14 }
15 """;
16
17 main() {
18 integration('runs a script in unchecked mode by default', () {
10 servePackages((builder) { 19 servePackages((builder) {
11 builder.serve("foo", "1.0.0", contents: [ 20 builder.serve("foo", "1.0.0", contents: [
12 d.dir("bin", [ 21 d.dir("bin", [
13 d.file("script.dart", "main(args) => print('ok');") 22 d.file("script.dart", SCRIPT)
14 ]) 23 ])
15 ]); 24 ]);
16 }); 25 });
17 26
18 schedulePub(args: ["global", "activate", "foo"]); 27 schedulePub(args: ["global", "activate", "foo"]);
19 28
20 var pub = pubRun(global: true, args: ["foo:script"]); 29 var pub = pubRun(global: true, args: ["foo:script"]);
21 pub.stdout.expect("ok"); 30 pub.stdout.expect("no checks");
22 pub.shouldExit(); 31 pub.shouldExit();
23 }); 32 });
24 } 33 }
OLDNEW
« 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