Index: test/runner/compact_reporter_test.dart |
diff --git a/test/runner/compact_reporter_test.dart b/test/runner/compact_reporter_test.dart |
index a0ab8c1ed61399645da0d9c2d1a8488ea2ddb83f..386bb56cd97a047c254782a235fff6b0fcc6920c 100644 |
--- a/test/runner/compact_reporter_test.dart |
+++ b/test/runner/compact_reporter_test.dart |
@@ -331,9 +331,13 @@ void main() { |
}, skip: true);""", |
""" |
+0: loading test.dart |
- +0: skip |
- +0 ~1: skip |
- +0 ~1: All tests skipped."""); |
+ +0: skip test 1 |
+ +0 ~1: skip test 1 |
+ +0 ~1: skip test 2 |
+ +0 ~2: skip test 2 |
+ +0 ~2: skip test 3 |
+ +0 ~3: skip test 3 |
+ +0 ~3: All tests skipped."""); |
}); |
test("runs skipped tests along with successful tests", () { |
@@ -404,10 +408,24 @@ void main() { |
+0 ~2: skip 2 |
+0 ~2: All tests skipped."""); |
}); |
+ |
+ test("runs skipped tests with --run-skipped", () { |
+ _expectReport(""" |
+ test('skip 1', () {}, skip: 'some reason'); |
+ test('skip 2', () {}, skip: 'or another');""", |
+ """ |
+ +0: loading test.dart |
+ +0: skip 1 |
+ +1: skip 1 |
+ +1: skip 2 |
+ +2: skip 2 |
+ +2: All tests passed!""", |
+ args: ["--run-skipped"]); |
+ }); |
}); |
} |
-void _expectReport(String tests, String expected) { |
+void _expectReport(String tests, String expected, {List<String> args}) { |
var dart = """ |
import 'dart:async'; |
@@ -420,7 +438,7 @@ $tests |
d.file("test.dart", dart).create(); |
- var test = runTest(["test.dart"], reporter: "compact"); |
+ var test = runTest(["test.dart"]..addAll(args ?? []), reporter: "compact"); |
test.shouldExit(); |
schedule(() async { |