diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-06 16:27:23 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-10-10 19:29:59 +0900 |
commit | 7371f57cf421a97430687e77a7477c429b742e61 (patch) | |
tree | 00576ea9cc565c4c2ea2d0d0a9cba973f79866c3 /tests/format/option-flags | |
parent | 5d6cad8f5f76be2e46c748f9eb770b84ec18f7e1 (diff) | |
download | buildstream-7371f57cf421a97430687e77a7477c429b742e61.tar.gz |
tests/format/optionflags.py: Added flags option specific test cases
Diffstat (limited to 'tests/format/option-flags')
-rw-r--r-- | tests/format/option-flags/element-in.bst | 10 | ||||
-rw-r--r-- | tests/format/option-flags/element.bst | 10 | ||||
-rw-r--r-- | tests/format/option-flags/project.conf | 22 |
3 files changed, 42 insertions, 0 deletions
diff --git a/tests/format/option-flags/element-in.bst b/tests/format/option-flags/element-in.bst new file mode 100644 index 000000000..d8565e603 --- /dev/null +++ b/tests/format/option-flags/element-in.bst @@ -0,0 +1,10 @@ +kind: autotools +variables: + result: "a pony" + (?): + - ("zebry" in farm): + result: "a zebry" + - ("pony" not in farm): + result: "no pony" + - (animal not in farm): + result: "no horsy" diff --git a/tests/format/option-flags/element.bst b/tests/format/option-flags/element.bst new file mode 100644 index 000000000..fde971050 --- /dev/null +++ b/tests/format/option-flags/element.bst @@ -0,0 +1,10 @@ +kind: autotools +variables: + result: "a pony" + (?): + - farm == [ "zebry" ]: + result: "a zebry" + - farm == [ "horsy", "pony" ]: + result: "a pony and a horsy" + - farm == [ "horsy", "pony", "zebry" ]: + result: "all the animals" diff --git a/tests/format/option-flags/project.conf b/tests/format/option-flags/project.conf new file mode 100644 index 000000000..1cab9e315 --- /dev/null +++ b/tests/format/option-flags/project.conf @@ -0,0 +1,22 @@ +name: test + +options: + # Include an enum option here so we can compare it + animal: + type: enum + description: The kind of animal + values: + - pony + - horsy + - zebry + default: horsy + # A flags value to test + farm: + type: flags + description: The kinds of animals on this farm + values: + - pony + - horsy + - zebry + default: + - pony |