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

Unified Diff: test/runner/tag_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/runner_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/runner/tag_test.dart
diff --git a/test/runner/tag_test.dart b/test/runner/tag_test.dart
index 2af690c7dab026ff416224a85ad2a1ab2f655247..2dce70087c46f26c1f7ac6f988798388a35a543d 100644
--- a/test/runner/tag_test.dart
+++ b/test/runner/tag_test.dart
@@ -60,6 +60,15 @@ void main() {
test.shouldExit(0);
});
+ test("supports boolean selector syntax", () {
+ var test = runTest(["--tags=b || c", "test.dart"]);
+ test.stdout.expect(tagWarnings(['a']));
+ test.stdout.expect(consumeThrough(contains(": b")));
+ test.stdout.expect(consumeThrough(contains(": bc")));
+ test.stdout.expect(consumeThrough(contains("+2: All tests passed!")));
+ test.shouldExit(0);
+ });
+
test("prints no warnings when all tags are specified", () {
var test = runTest(["--tags=a,b,c", "test.dart"]);
test.stdout.expect(consumeThrough(contains("No tests ran.")));
@@ -97,6 +106,16 @@ void main() {
test.shouldExit(0);
});
+ test("supports boolean selector syntax", () {
+ var test = runTest(["--exclude-tags=b && c", "test.dart"]);
+ test.stdout.expect(tagWarnings(['a']));
+ test.stdout.expect(consumeThrough(contains(": no tags")));
+ test.stdout.expect(consumeThrough(contains(": a")));
+ test.stdout.expect(consumeThrough(contains(": b")));
+ test.stdout.expect(consumeThrough(contains("+3: All tests passed!")));
+ test.shouldExit(0);
+ });
+
test("prints no warnings when all tags are specified", () {
var test = runTest(["--exclude-tags=a,b,c", "test.dart"]);
test.stdout.expect(consumeThrough(contains(": no tags")));
@@ -135,22 +154,6 @@ void main() {
});
});
- group('with --tags and --exclude-tags', () {
- test('refuses to include and exclude the same tag simultaneously', () {
- var test = runTest(["-t", "a,b", "-x", "a,b,c", "test.dart"]);
- test.stderr.expect(consumeThrough(
- contains("The tags a and b were both included and excluded.")));
- test.shouldExit(64);
- });
-
- test("--exclude-tags takes precedence over --tags", () {
- var test = runTest(["-t", "b", "-x", "c", "test.dart"]);
- test.stdout.expect(consumeThrough(contains(": b")));
- test.stdout.expect(consumeThrough(contains("+1: All tests passed!")));
- test.shouldExit(0);
- });
- });
-
test('respects top-level @Tags annotations', () {
d.file("test.dart", """
@Tags(const ['a'])
« no previous file with comments | « test/runner/runner_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698