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