Skip to content

Commit

Permalink
Forbid define_platforms in the global config file
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Oct 16, 2017
1 parent b1e8da7 commit 465927c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/src/runner/configuration/load.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ class _ConfigurationLoader {
_disallow("filename");
_disallow("include_tags");
_disallow("exclude_tags");
_disallow("define_platforms");
return Configuration.empty;
}

Expand Down
5 changes: 3 additions & 2 deletions test/runner/configuration/global_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ void main() {
group("disallows local-only configuration:", () {
for (var field in [
"skip", "retry", "test_on", "paths", "filename", "names", "tags", //
"plain_names", "include_tags", "exclude_tags", "pub_serve", "add_tags"
"plain_names", "include_tags", "exclude_tags", "pub_serve", "add_tags",
"define_platforms"
]) {
test("rejects local-only configuration", () async {
test("for $field", () async {
await d.file("global_test.yaml", JSON.encode({field: null})).create();

await d.file("test.dart", """
Expand Down

0 comments on commit 465927c

Please sign in to comment.