summaryrefslogtreecommitdiff
path: root/lib/configuration/tests/configuration.t
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-19 09:57:49 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-19 09:57:49 +0100
commite1bf7686f408b52a870d4ed4f3c565dbbcc3954f (patch)
treeee7e156032cc0c43ca10879051e64c3dfeab1515 /lib/configuration/tests/configuration.t
parenta9628fda0fc027c54b5ed5313a0c41731d79e41f (diff)
Management of lists in the settings
Diffstat (limited to 'lib/configuration/tests/configuration.t')
-rw-r--r--lib/configuration/tests/configuration.t44
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/configuration/tests/configuration.t b/lib/configuration/tests/configuration.t
index e44b91a..880e690 100644
--- a/lib/configuration/tests/configuration.t
+++ b/lib/configuration/tests/configuration.t
@@ -75,3 +75,47 @@ Cycles between elements are accepted when they are not mandatory to each other
> }
+
+Lists are declared in the "list" key, with a source given either as a plain
+kind string or as an object with a "type" and an optional "file". A reference
+field can target a list, like a content:
+
+ $ tests --configuration <<EOF
+ > {
+ > "list": [
+ > {
+ > "id": "user_type_list",
+ > "source": "csv"
+ > },
+ > {
+ > "id": "status_list",
+ > "source": { "type": "csv", "file": "status.csv" }
+ > }
+ > ],
+ > "content": [
+ > {
+ > "id": "entity",
+ > "section": [
+ > {
+ > "field": [
+ > {
+ > "name": "user_type",
+ > "label": {},
+ > "type": { "content": "user_type_list" }
+ > },
+ > {
+ > "name": "statuses",
+ > "label": {},
+ > "type": {
+ > "content": "status_list",
+ > "multivaluated": true
+ > }
+ > }
+ > ]
+ > }
+ > ]
+ > }
+ > ]
+ > }
+ > EOF
+