diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-03-27 08:48:05 +0100 |
| commit | 830e7c5d27d161b91402414e6ecd49f1ed818bfb (patch) | |
| tree | 448864635d29b1ea66424cbb9e0816fbcf1e1907 /lib/configuration/tests/configuration.t | |
Initial commit
Diffstat (limited to 'lib/configuration/tests/configuration.t')
| -rw-r--r-- | lib/configuration/tests/configuration.t | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/lib/configuration/tests/configuration.t b/lib/configuration/tests/configuration.t new file mode 100644 index 0000000..a732db6 --- /dev/null +++ b/lib/configuration/tests/configuration.t @@ -0,0 +1,77 @@ +The configuration is written in JSON5 format. + +Minimal configuration file with nothing: + + $ tests -configuration <<EOF + > { "content" : [] } + > + > EOF + + +Trailing coma are accepted: + + $ tests -configuration <<EOF + > { "content" : + > [ + > { + > "id": "entity", + > }, + > ] + > } + > + > EOF + +Comments are accepted: + + $ tests -configuration <<EOF + > { "content" : + > [ + > { + > // This is a comment in the file + > "id": "entity", + > } + > ] + > } + > + > EOF + +Cycles between elements are accepted when they are not mandatory to each other + + $ tests -configuration <<EOF + > { + > "content": [ + > { + > "id": "entity", + > "section": [ + > { + > "field": [ + > { + > "name": "user_type", + > "label": {}, + > "type": { + > "content": "user", + > "multivaluated": true + > } + > } + > ] + > } + > ] + > }, + > { + > "id": "user", + > "section": [ + > { + > "field": [ + > { + > "name": "entity", + > "label": {}, + > "type": { "content": "entity", } + > } + > ] + > } + > ] + > } + > ] + > } + + |
