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

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

Issue 1715583003: Use boolean selector syntax for tags. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 10 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/configuration_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/configuration/tags_test.dart
diff --git a/test/runner/configuration/tags_test.dart b/test/runner/configuration/tags_test.dart
index c85987a7f7ce4fbd98467355840720dea8585084..0376a9591206a96059e6bebd7f29a17e3390d608 100644
--- a/test/runner/configuration/tags_test.dart
+++ b/test/runner/configuration/tags_test.dart
@@ -84,6 +84,32 @@ void main() {
test.shouldExit(1);
});
+ test("supports tag selectors", () {
+ d.file("dart_test.yaml", JSON.encode({
+ "tags": {"foo && bar": {"timeout": "0s"}}
+ })).create();
+
+ d.file("test.dart", """
+ import 'dart:async';
+
+ import 'package:test/test.dart';
+
+ void main() {
+ test("test 1", () => new Future.delayed(Duration.ZERO), tags: ['foo']);
+ test("test 2", () => new Future.delayed(Duration.ZERO), tags: ['bar']);
+ test("test 3", () => new Future.delayed(Duration.ZERO),
+ tags: ['foo', 'bar']);
+ }
+ """).create();
+
+ var test = runTest(["test.dart"]);
+ test.stdout.expect(containsInOrder([
+ "+2 -1: test 3",
+ "+2 -1: Some tests failed."
+ ]));
+ test.shouldExit(1);
+ });
+
test("allows tag inheritance via add_tags", () {
d.file("dart_test.yaml", JSON.encode({
"tags": {
@@ -119,14 +145,14 @@ void main() {
test.shouldExit(exit_codes.data);
});
- test("rejects an invalid tag name", () {
+ test("rejects an invalid tag selector", () {
d.file("dart_test.yaml", JSON.encode({
"tags": {"foo bar": null}
})).create();
var test = runTest([]);
test.stderr.expect(containsInOrder([
- "Invalid tag. Tags must be (optionally hyphenated) Dart identifiers.",
+ "Invalid tags key: Expected end of input.",
"^^^^^^^^^"
]));
test.shouldExit(exit_codes.data);
« no previous file with comments | « test/runner/configuration/configuration_test.dart ('k') | test/runner/runner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698