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

Unified Diff: test/runner/configuration/top_level_test.dart

Issue 1802133002: Add names and plain_names fields. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/runner/configuration/top_level_error_test.dart ('k') | test/runner/name_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/configuration/top_level_test.dart
diff --git a/test/runner/configuration/top_level_test.dart b/test/runner/configuration/top_level_test.dart
index 0069cf87286d8309b12c51ee0e2dc7e7c24f1bb1..d9537e7c2616b80aed1073ff06d55b9aa779254f 100644
--- a/test/runner/configuration/top_level_test.dart
+++ b/test/runner/configuration/top_level_test.dart
@@ -374,6 +374,53 @@ transformers:
test.shouldExit(0);
});
+
+ test("uses the specified regexp names", () {
+ d.file("dart_test.yaml", JSON.encode({
+ "names": ["z[ia]p", "a"]
+ })).create();
+
+ d.file("test.dart", """
+ import 'package:test/test.dart';
+
+ void main() {
+ test("zip", () {});
+ test("zap", () {});
+ test("zop", () {});
+ }
+ """).create();
+
+ var test = runTest(["test.dart"]);
+ test.stdout.expect(containsInOrder([
+ "+0: zap",
+ "+1: All tests passed!"
+ ]));
+ test.shouldExit(0);
+ });
+
+ test("uses the specified plain names", () {
+ d.file("dart_test.yaml", JSON.encode({
+ "names": ["z", "a"]
+ })).create();
+
+ d.file("test.dart", """
+ import 'package:test/test.dart';
+
+ void main() {
+ test("zip", () {});
+ test("zap", () {});
+ test("zop", () {});
+ }
+ """).create();
+
+ var test = runTest(["test.dart"]);
+ test.stdout.expect(containsInOrder([
+ "+0: zap",
+ "+1: All tests passed!"
+ ]));
+ test.shouldExit(0);
+ });
+
test("uses the specified paths", () {
d.file("dart_test.yaml", JSON.encode({
"paths": ["zip", "zap"]
« no previous file with comments | « test/runner/configuration/top_level_error_test.dart ('k') | test/runner/name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698