| Index: test/runner/runner_test.dart
|
| diff --git a/test/runner/runner_test.dart b/test/runner/runner_test.dart
|
| index 045ce76e256d8e9083213742dc007b5d9b9ffe65..d05c58c8861b9f33557f5e9e6d116b3157e08040 100644
|
| --- a/test/runner/runner_test.dart
|
| +++ b/test/runner/runner_test.dart
|
| @@ -61,6 +61,8 @@ Usage: pub run test [files or directories...]
|
| -x, --exclude-tags Don't run tests with any of the specified tags.
|
| Supports boolean selector syntax.
|
|
|
| + --[no-]run-skipped Run skipped tests instead of skipping them.
|
| +
|
| ======== Running Tests
|
| -p, --platform The platform(s) on which to run the tests.
|
| $_browsers
|
| @@ -359,22 +361,32 @@ $_usage""");
|
| test.shouldExit(1);
|
| });
|
|
|
| - test("respects top-level @Skip declarations", () {
|
| - d.file("test.dart", '''
|
| -@Skip()
|
| + group("with a top-level @Skip declaration", () {
|
| + setUp(() {
|
| + d.file("test.dart", '''
|
| + @Skip()
|
|
|
| -import 'dart:async';
|
| + import 'dart:async';
|
|
|
| -import 'package:test/test.dart';
|
| + import 'package:test/test.dart';
|
|
|
| -void main() {
|
| - test("fail", () => throw 'oh no');
|
| -}
|
| -''').create();
|
| + void main() {
|
| + test("success", () {});
|
| + }
|
| + ''').create();
|
| + });
|
|
|
| - var test = runTest(["test.dart"]);
|
| - test.stdout.expect(consumeThrough(contains("+0 ~1: All tests skipped.")));
|
| - test.shouldExit(0);
|
| + test("skips all tests", () {
|
| + var test = runTest(["test.dart"]);
|
| + test.stdout.expect(consumeThrough(contains("+0 ~1: All tests skipped.")));
|
| + test.shouldExit(0);
|
| + });
|
| +
|
| + test("runs all tests with --run-skipped", () {
|
| + var test = runTest(["--run-skipped", "test.dart"]);
|
| + test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
|
| + test.shouldExit(0);
|
| + });
|
| });
|
|
|
| group("with onPlatform", () {
|
|
|