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); |
}); |
} |