summaryrefslogtreecommitdiff
path: root/tests/files/success/test_type_enum.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/files/success/test_type_enum.yaml')
-rw-r--r--tests/files/success/test_type_enum.yaml43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/files/success/test_type_enum.yaml b/tests/files/success/test_type_enum.yaml
new file mode 100644
index 0000000..bde9bd7
--- /dev/null
+++ b/tests/files/success/test_type_enum.yaml
@@ -0,0 +1,43 @@
+---
+name: type-enum-1
+desc: Test the most basic case for enum
+data: C
+schema:
+ type: str
+ enum: [A, B, C, D, E]
+---
+name: type-enum-2
+desc: Test bool value inside list
+data:
+ - B
+ - C
+schema:
+ type: seq
+ sequence:
+ - type: str
+ enum: [A, B, C, D, E]
+---
+name: type-enum-3
+desc: Test bool value in mapping
+data:
+ foo: A
+schema:
+ type: map
+ mapping:
+ foo:
+ type: str
+ enum: [A, B, C, D, E]
+---
+name: type-enum-4
+desc: Test bool inside nested map & seq
+data:
+ foo:
+ - C
+schema:
+ type: map
+ mapping:
+ foo:
+ type: seq
+ sequence:
+ - type: str
+ enum: [A, B, C, D, E]