From fd8a2843ba5df8be31ad2144255ba2cb53f1f53c Mon Sep 17 00:00:00 2001 From: Emmanuel Garette <egarette@silique.fr> Date: Tue, 1 Apr 2025 19:42:45 +0200 Subject: [PATCH] fix: groups.namespace could be unexistant --- locale/fr/LC_MESSAGES/rougail_output_doc.po | 22 +-- locale/rougail_output_doc.pot | 20 +-- src/rougail/output_doc/doc.py | 2 +- .../fr/LC_MESSAGES/rougail_output_doc.mo | Bin 6340 -> 6340 bytes tests/force_optional.adoc | 2 +- tests/force_optional/00_file.yml | 4 +- tests/results/test/00_6choice_link.adoc | 27 ++++ tests/results/test/00_6choice_link.json | 65 +++++++++ tests/results/test/00_6choice_link.md | 5 + tests/results/test/00_6choice_link.sh | 17 +++ .../test/00_6choice_variable_link.adoc | 29 ++++ .../test/00_6choice_variable_link.json | 97 +++++++++++++ .../results/test/00_6choice_variable_link.md | 6 + .../results/test/00_6choice_variable_link.sh | 20 +++ .../test/00_6choice_variable_link2.adoc | 38 +++++ .../test/00_6choice_variable_link2.json | 116 +++++++++++++++ .../results/test/00_6choice_variable_link2.md | 13 ++ .../results/test/00_6choice_variable_link2.sh | 31 ++++ tests/results/test/00_6regexp_link.adoc | 23 +++ tests/results/test/00_6regexp_link.json | 66 +++++++++ tests/results/test/00_6regexp_link.md | 5 + tests/results/test/00_6regexp_link.sh | 19 +++ .../results/test_examples/00_6choice_link.md | 13 ++ .../test_examples/00_6choice_variable_link.md | 11 ++ .../00_6choice_variable_link2.md | 12 ++ .../results/test_examples/00_6regexp_link.md | 7 + .../test_namespace/00_6choice_link.adoc | 29 ++++ .../test_namespace/00_6choice_link.json | 85 +++++++++++ .../results/test_namespace/00_6choice_link.md | 7 + .../results/test_namespace/00_6choice_link.sh | 22 +++ .../00_6choice_variable_link.adoc | 31 ++++ .../00_6choice_variable_link.json | 117 +++++++++++++++ .../00_6choice_variable_link.md | 8 ++ .../00_6choice_variable_link.sh | 25 ++++ .../00_6choice_variable_link2.adoc | 40 ++++++ .../00_6choice_variable_link2.json | 136 ++++++++++++++++++ .../00_6choice_variable_link2.md | 15 ++ .../00_6choice_variable_link2.sh | 36 +++++ .../test_namespace/00_6regexp_link.adoc | 25 ++++ .../test_namespace/00_6regexp_link.json | 86 +++++++++++ .../results/test_namespace/00_6regexp_link.md | 7 + .../results/test_namespace/00_6regexp_link.sh | 24 ++++ .../00_6choice_link.md | 15 ++ .../00_6choice_variable_link.md | 12 ++ .../00_6choice_variable_link2.md | 13 ++ .../00_6regexp_link.md | 8 ++ 46 files changed, 1386 insertions(+), 25 deletions(-) create mode 100644 tests/results/test/00_6choice_link.adoc create mode 100644 tests/results/test/00_6choice_link.json create mode 100644 tests/results/test/00_6choice_link.md create mode 100644 tests/results/test/00_6choice_link.sh create mode 100644 tests/results/test/00_6choice_variable_link.adoc create mode 100644 tests/results/test/00_6choice_variable_link.json create mode 100644 tests/results/test/00_6choice_variable_link.md create mode 100644 tests/results/test/00_6choice_variable_link.sh create mode 100644 tests/results/test/00_6choice_variable_link2.adoc create mode 100644 tests/results/test/00_6choice_variable_link2.json create mode 100644 tests/results/test/00_6choice_variable_link2.md create mode 100644 tests/results/test/00_6choice_variable_link2.sh create mode 100644 tests/results/test/00_6regexp_link.adoc create mode 100644 tests/results/test/00_6regexp_link.json create mode 100644 tests/results/test/00_6regexp_link.md create mode 100644 tests/results/test/00_6regexp_link.sh create mode 100644 tests/results/test_examples/00_6choice_link.md create mode 100644 tests/results/test_examples/00_6choice_variable_link.md create mode 100644 tests/results/test_examples/00_6choice_variable_link2.md create mode 100644 tests/results/test_examples/00_6regexp_link.md create mode 100644 tests/results/test_namespace/00_6choice_link.adoc create mode 100644 tests/results/test_namespace/00_6choice_link.json create mode 100644 tests/results/test_namespace/00_6choice_link.md create mode 100644 tests/results/test_namespace/00_6choice_link.sh create mode 100644 tests/results/test_namespace/00_6choice_variable_link.adoc create mode 100644 tests/results/test_namespace/00_6choice_variable_link.json create mode 100644 tests/results/test_namespace/00_6choice_variable_link.md create mode 100644 tests/results/test_namespace/00_6choice_variable_link.sh create mode 100644 tests/results/test_namespace/00_6choice_variable_link2.adoc create mode 100644 tests/results/test_namespace/00_6choice_variable_link2.json create mode 100644 tests/results/test_namespace/00_6choice_variable_link2.md create mode 100644 tests/results/test_namespace/00_6choice_variable_link2.sh create mode 100644 tests/results/test_namespace/00_6regexp_link.adoc create mode 100644 tests/results/test_namespace/00_6regexp_link.json create mode 100644 tests/results/test_namespace/00_6regexp_link.md create mode 100644 tests/results/test_namespace/00_6regexp_link.sh create mode 100644 tests/results/test_namespace_examples/00_6choice_link.md create mode 100644 tests/results/test_namespace_examples/00_6choice_variable_link.md create mode 100644 tests/results/test_namespace_examples/00_6choice_variable_link2.md create mode 100644 tests/results/test_namespace_examples/00_6regexp_link.md diff --git a/locale/fr/LC_MESSAGES/rougail_output_doc.po b/locale/fr/LC_MESSAGES/rougail_output_doc.po index 7f8ae56..64cadfa 100644 --- a/locale/fr/LC_MESSAGES/rougail_output_doc.po +++ b/locale/fr/LC_MESSAGES/rougail_output_doc.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"POT-Creation-Date: 2025-03-31 09:14+0200\n" -"PO-Revision-Date: 2025-03-31 09:15+0200\n" +"POT-Creation-Date: 2025-04-01 19:39+0200\n" +"PO-Revision-Date: 2025-04-01 19:41+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: fr\n" @@ -120,39 +120,39 @@ msgstr "multiple" msgid "No attribute \"description\" for \"{0}\" in {1}" msgstr "Aucun attribut \"description\" pour \"{0}\" dans {1}" -#: src/rougail/output_doc/doc.py:463 +#: src/rougail/output_doc/doc.py:465 msgid "(default)" msgstr "(défaut)" -#: src/rougail/output_doc/doc.py:470 +#: src/rougail/output_doc/doc.py:472 msgid "text based with regular expressions \"{0}\"" msgstr "texte avec expression rationnelle \"{0}\"" -#: src/rougail/output_doc/doc.py:558 +#: src/rougail/output_doc/doc.py:560 msgid "depends on a calculation" msgstr "dépend d'un calcul" -#: src/rougail/output_doc/doc.py:559 +#: src/rougail/output_doc/doc.py:561 msgid "\"{0}\" is a calculation for {1} but has no description in {2}" msgstr "\"{0}\" est un calcul pour {1} mais n'a pas de description dans {2}" -#: src/rougail/output_doc/doc.py:581 +#: src/rougail/output_doc/doc.py:583 msgid "the value of the variable \"{0}\"" msgstr "la valeur de la variable \"{0}\"" -#: src/rougail/output_doc/doc.py:582 +#: src/rougail/output_doc/doc.py:584 msgid "the value of an undocumented variable" msgstr "la valeur d'une variable non documentée" -#: src/rougail/output_doc/doc.py:597 +#: src/rougail/output_doc/doc.py:599 msgid "the values of undocumented variables" msgstr "les valeurs de variables non documentées" -#: src/rougail/output_doc/doc.py:604 +#: src/rougail/output_doc/doc.py:606 msgid "the value of the identifier" msgstr "la valeur de l'identifiant" -#: src/rougail/output_doc/doc.py:608 +#: src/rougail/output_doc/doc.py:610 msgid "the value of the {0}" msgstr "la valeur de l'{0}" diff --git a/locale/rougail_output_doc.pot b/locale/rougail_output_doc.pot index edb34e1..f344228 100644 --- a/locale/rougail_output_doc.pot +++ b/locale/rougail_output_doc.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2025-03-31 09:15+0200\n" +"POT-Creation-Date: 2025-04-01 19:41+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -119,39 +119,39 @@ msgstr "" msgid "No attribute \"description\" for \"{0}\" in {1}" msgstr "" -#: src/rougail/output_doc/doc.py:463 +#: src/rougail/output_doc/doc.py:465 msgid "(default)" msgstr "" -#: src/rougail/output_doc/doc.py:470 +#: src/rougail/output_doc/doc.py:472 msgid "text based with regular expressions \"{0}\"" msgstr "" -#: src/rougail/output_doc/doc.py:558 +#: src/rougail/output_doc/doc.py:560 msgid "depends on a calculation" msgstr "" -#: src/rougail/output_doc/doc.py:559 +#: src/rougail/output_doc/doc.py:561 msgid "\"{0}\" is a calculation for {1} but has no description in {2}" msgstr "" -#: src/rougail/output_doc/doc.py:581 +#: src/rougail/output_doc/doc.py:583 msgid "the value of the variable \"{0}\"" msgstr "" -#: src/rougail/output_doc/doc.py:582 +#: src/rougail/output_doc/doc.py:584 msgid "the value of an undocumented variable" msgstr "" -#: src/rougail/output_doc/doc.py:597 +#: src/rougail/output_doc/doc.py:599 msgid "the values of undocumented variables" msgstr "" -#: src/rougail/output_doc/doc.py:604 +#: src/rougail/output_doc/doc.py:606 msgid "the value of the identifier" msgstr "" -#: src/rougail/output_doc/doc.py:608 +#: src/rougail/output_doc/doc.py:610 msgid "the value of the {0}" msgstr "" diff --git a/src/rougail/output_doc/doc.py b/src/rougail/output_doc/doc.py index a6f0f80..ed2024c 100644 --- a/src/rougail/output_doc/doc.py +++ b/src/rougail/output_doc/doc.py @@ -346,7 +346,7 @@ class RougailOutputDoc(Examples): informations["names"] = [obj.name()] description = obj.description(uncalculated=True) if obj.name(uncalculated=True) == description and ( - not obj.isoptiondescription() or obj.group_type() is not groups.namespace + not obj.isoptiondescription() or (self.support_namespace and obj.group_type() is not groups.namespace) ): warning = _('No attribute "description" for "{0}" in {1}').format( obj.path(uncalculated=True), diff --git a/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo b/src/rougail/output_doc/locale/fr/LC_MESSAGES/rougail_output_doc.mo index 4a8f2a64edae9a31b9d71cb30763b8bcdadbcad3..71d59bf4a89d226c85bc8ac119127da1afb61b46 100644 GIT binary patch delta 23 ecmX?Nc*JnSWIiqvT?0b}LrW_Y!_9N~)VTm%B?iC% delta 23 ecmX?Nc*JnSWIirqU1LK914}DI)6H}F)VTm%HU`1~ diff --git a/tests/force_optional.adoc b/tests/force_optional.adoc index a23dc71..bc42008 100644 --- a/tests/force_optional.adoc +++ b/tests/force_optional.adoc @@ -67,7 +67,7 @@ This family builds families dynamically. | Variable | Description | -**var__example__.var** + +**var___example__.var** + `https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `mandatory` | A variable. |==== diff --git a/tests/force_optional/00_file.yml b/tests/force_optional/00_file.yml index 006a21d..f692504 100644 --- a/tests/force_optional/00_file.yml +++ b/tests/force_optional/00_file.yml @@ -50,10 +50,10 @@ var8: description: my var8 choices: jinja: | - a.unknown.variable + {{ a.unknown.variable }} description: the a.unknown.variable values -"var{{ identifier }}": +"var_{{ identifier }}": description: my var6 dynamic: variable: a.unknown.variable diff --git a/tests/results/test/00_6choice_link.adoc b/tests/results/test/00_6choice_link.adoc new file mode 100644 index 0000000..bc0c5ea --- /dev/null +++ b/tests/results/test/00_6choice_link.adoc @@ -0,0 +1,27 @@ +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `basic` `mandatory` | +The first variable. + +**Choices**: + +* a +* b +* c +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +The second variable. + +**Choices**: + +* a +* b +* c + +**Default**: the value of the variable "var1". +|==== + diff --git a/tests/results/test/00_6choice_link.json b/tests/results/test/00_6choice_link.json new file mode 100644 index 0000000..1615bb7 --- /dev/null +++ b/tests/results/test/00_6choice_link.json @@ -0,0 +1,65 @@ +{ + "var1": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": [ + "a", + "b", + "c" + ], + "paths": [ + "var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "The first variable." + ] + }, + "var2": { + "type": "variable", + "default": "the value of the variable \"var1\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": [ + "a", + "b", + "c" + ], + "paths": [ + "var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "The second variable." + ] + } +} \ No newline at end of file diff --git a/tests/results/test/00_6choice_link.md b/tests/results/test/00_6choice_link.md new file mode 100644 index 0000000..242767d --- /dev/null +++ b/tests/results/test/00_6choice_link.md @@ -0,0 +1,5 @@ +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **var1**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.<br/>**Choices**: <br/>- a<br/>- b<br/>- c | +| **var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The second variable.<br/>**Choices**: <br/>- a<br/>- b<br/>- c<br/>**Default**: the value of the variable "var1". | + diff --git a/tests/results/test/00_6choice_link.sh b/tests/results/test/00_6choice_link.sh new file mode 100644 index 0000000..4e7489d --- /dev/null +++ b/tests/results/test/00_6choice_link.sh @@ -0,0 +1,17 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mvar1[0m │ The first variable. │ +│ [1;7m choice [0m [1;7m basic [0m [1;7m mandatory [0m │ [1mChoices[0m: │ +│ │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mvar2[0m │ The second variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: │ +│ │ - a │ +│ │ - b │ +│ │ - c │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "var1". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test/00_6choice_variable_link.adoc b/tests/results/test/00_6choice_variable_link.adoc new file mode 100644 index 0000000..65f958a --- /dev/null +++ b/tests/results/test/00_6choice_variable_link.adoc @@ -0,0 +1,29 @@ +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` | +A second variable. + +**Default**: + +* a +* b +* c +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A first variable. + +**Choices**: the value of the variable "var1". + +**Default**: a +| + +**var3** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A third variable. + +**Choices**: the value of the variable "var1". + +**Default**: the value of the variable "var2". +|==== + diff --git a/tests/results/test/00_6choice_variable_link.json b/tests/results/test/00_6choice_variable_link.json new file mode 100644 index 0000000..7910ce9 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link.json @@ -0,0 +1,97 @@ +{ + "var1": { + "type": "variable", + "default": [ + "a", + "b", + "c" + ], + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + }, + { + "type": "property", + "name": "unique" + }, + { + "type": "multiple", + "name": "multiple" + } + ], + "paths": [ + "var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A second variable." + ] + }, + "var2": { + "type": "variable", + "default": "a", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"var1\".", + "paths": [ + "var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A first variable." + ] + }, + "var3": { + "type": "variable", + "default": "the value of the variable \"var2\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"var1\".", + "paths": [ + "var3" + ], + "names": [ + "var3" + ], + "descriptions": [ + "A third variable." + ] + } +} \ No newline at end of file diff --git a/tests/results/test/00_6choice_variable_link.md b/tests/results/test/00_6choice_variable_link.md new file mode 100644 index 0000000..744d353 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link.md @@ -0,0 +1,6 @@ +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A second variable.<br/>**Default**: <br/>- a<br/>- b<br/>- c | +| **var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Choices**: the value of the variable "var1".<br/>**Default**: a | +| **var3**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Choices**: the value of the variable "var1".<br/>**Default**: the value of the variable "var2". | + diff --git a/tests/results/test/00_6choice_variable_link.sh b/tests/results/test/00_6choice_variable_link.sh new file mode 100644 index 0000000..2c47291 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link.sh @@ -0,0 +1,20 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mvar1[0m │ A second variable. │ +│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: │ +│ [1;7munique [0m [1;7m multiple [0m │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mvar2[0m │ A first variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "var1". │ +│ │ [1mDefault[0m: a │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mvar3[0m │ A third variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "var1". │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "var2". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test/00_6choice_variable_link2.adoc b/tests/results/test/00_6choice_variable_link2.adoc new file mode 100644 index 0000000..214cb47 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link2.adoc @@ -0,0 +1,38 @@ +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` | +A second variable. + +**Default**: + +* a +* b +* c +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A first variable. + +**Choices**: the value of the variable "var1". + +**Default**: a +|==== + +== family + +`standard` + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**family.var3** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A third variable. + +**Choices**: the value of the variable "family.var1". + +**Default**: the value of the variable "var2". +|==== + diff --git a/tests/results/test/00_6choice_variable_link2.json b/tests/results/test/00_6choice_variable_link2.json new file mode 100644 index 0000000..9fa7550 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link2.json @@ -0,0 +1,116 @@ +{ + "var1": { + "type": "variable", + "default": [ + "a", + "b", + "c" + ], + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + }, + { + "type": "property", + "name": "unique" + }, + { + "type": "multiple", + "name": "multiple" + } + ], + "paths": [ + "var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A second variable." + ] + }, + "var2": { + "type": "variable", + "default": "a", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"var1\".", + "paths": [ + "var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A first variable." + ] + }, + "family": { + "type": "family", + "informations": { + "paths": [ + "family" + ], + "names": [ + "family" + ], + "properties": [ + { + "type": "mode", + "name": "standard" + } + ] + }, + "children": { + "family.var3": { + "type": "variable", + "default": "the value of the variable \"var2\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"family.var1\".", + "paths": [ + "family.var3" + ], + "names": [ + "var3" + ], + "descriptions": [ + "A third variable." + ] + } + } + } +} \ No newline at end of file diff --git a/tests/results/test/00_6choice_variable_link2.md b/tests/results/test/00_6choice_variable_link2.md new file mode 100644 index 0000000..096e160 --- /dev/null +++ b/tests/results/test/00_6choice_variable_link2.md @@ -0,0 +1,13 @@ +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A second variable.<br/>**Default**: <br/>- a<br/>- b<br/>- c | +| **var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Choices**: the value of the variable "var1".<br/>**Default**: a | + +# family + +`standard` + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **family.var3**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Choices**: the value of the variable "family.var1".<br/>**Default**: the value of the variable "var2". | + diff --git a/tests/results/test/00_6choice_variable_link2.sh b/tests/results/test/00_6choice_variable_link2.sh new file mode 100644 index 0000000..2b5ef9d --- /dev/null +++ b/tests/results/test/00_6choice_variable_link2.sh @@ -0,0 +1,31 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mvar1[0m │ A second variable. │ +│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: │ +│ [1;7munique [0m [1;7m multiple [0m │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mvar2[0m │ A first variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "var1". │ +│ │ [1mDefault[0m: a │ +└───────────────────────────────────────┴──────────────────────────────────────┘ + + +[1;4;96mfamily[0m + + +[1;7m standard [0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mfamily.var3[0m │ A third variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "family.var1". │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "var2". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test/00_6regexp_link.adoc b/tests/results/test/00_6regexp_link.adoc new file mode 100644 index 0000000..7a04be9 --- /dev/null +++ b/tests/results/test/00_6regexp_link.adoc @@ -0,0 +1,23 @@ +[cols="1a,1a"] +|==== +| Variable | Description +| + +**var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[regexp]` `standard` `mandatory` | +A first variable. + +**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$" + +**Default**: #a1a1a1 + +**Examples**: + +* '#b1b1b1' +* '#b2b2b2' +| + +**var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[regexp]` `standard` `mandatory` | +A second variable. + +**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$" + +**Default**: the value of the variable "var1". +|==== + diff --git a/tests/results/test/00_6regexp_link.json b/tests/results/test/00_6regexp_link.json new file mode 100644 index 0000000..065c6e2 --- /dev/null +++ b/tests/results/test/00_6regexp_link.json @@ -0,0 +1,66 @@ +{ + "var1": { + "type": "variable", + "default": "#a1a1a1", + "properties": [ + { + "type": "type", + "name": "regexp" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "validators": [ + "text based with regular expressions \"^#(?:[0-9a-f]{3}){1,2}$\"" + ], + "paths": [ + "var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A first variable." + ], + "examples": [ + "#b1b1b1", + "#b2b2b2" + ] + }, + "var2": { + "type": "variable", + "default": "the value of the variable \"var1\".", + "properties": [ + { + "type": "type", + "name": "regexp" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "validators": [ + "text based with regular expressions \"^#(?:[0-9a-f]{3}){1,2}$\"" + ], + "paths": [ + "var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A second variable." + ] + } +} \ No newline at end of file diff --git a/tests/results/test/00_6regexp_link.md b/tests/results/test/00_6regexp_link.md new file mode 100644 index 0000000..b24a2f7 --- /dev/null +++ b/tests/results/test/00_6regexp_link.md @@ -0,0 +1,5 @@ +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **var1**<br/>[`regexp`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$"<br/>**Default**: #a1a1a1<br/>**Examples**: <br/>- #b1b1b1<br/>- #b2b2b2 | +| **var2**<br/>[`regexp`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A second variable.<br/>**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$"<br/>**Default**: the value of the variable "var1". | + diff --git a/tests/results/test/00_6regexp_link.sh b/tests/results/test/00_6regexp_link.sh new file mode 100644 index 0000000..be47f97 --- /dev/null +++ b/tests/results/test/00_6regexp_link.sh @@ -0,0 +1,19 @@ +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mvar1[0m │ A first variable. │ +│ [1;7m regexp [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mValidator[0m: text based with regular │ +│ │ expressions │ +│ │ "^#(?:[0-9a-f]{3}){1,2}$" │ +│ │ [1mDefault[0m: #a1a1a1 │ +│ │ [1mExamples[0m: │ +│ │ - #b1b1b1 │ +│ │ - #b2b2b2 │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mvar2[0m │ A second variable. │ +│ [1;7m regexp [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mValidator[0m: text based with regular │ +│ │ expressions │ +│ │ "^#(?:[0-9a-f]{3}){1,2}$" │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "var1". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_examples/00_6choice_link.md b/tests/results/test_examples/00_6choice_link.md new file mode 100644 index 0000000..91b7520 --- /dev/null +++ b/tests/results/test_examples/00_6choice_link.md @@ -0,0 +1,13 @@ +# Example with mandatory variables not filled in + +```yaml +--- +var1: a_choice +``` +# Example with all variables modifiable + +```yaml +--- +var1: a_choice +var2: a_choice +``` diff --git a/tests/results/test_examples/00_6choice_variable_link.md b/tests/results/test_examples/00_6choice_variable_link.md new file mode 100644 index 0000000..f9cf825 --- /dev/null +++ b/tests/results/test_examples/00_6choice_variable_link.md @@ -0,0 +1,11 @@ +# Example with all variables modifiable + +```yaml +--- +var1: + - a + - b + - c +var2: a +var3: a +``` diff --git a/tests/results/test_examples/00_6choice_variable_link2.md b/tests/results/test_examples/00_6choice_variable_link2.md new file mode 100644 index 0000000..e8d90ab --- /dev/null +++ b/tests/results/test_examples/00_6choice_variable_link2.md @@ -0,0 +1,12 @@ +# Example with all variables modifiable + +```yaml +--- +var1: + - a + - b + - c +var2: a +family: + var3: a +``` diff --git a/tests/results/test_examples/00_6regexp_link.md b/tests/results/test_examples/00_6regexp_link.md new file mode 100644 index 0000000..4d7f56c --- /dev/null +++ b/tests/results/test_examples/00_6regexp_link.md @@ -0,0 +1,7 @@ +# Example with all variables modifiable + +```yaml +--- +var1: '#b1b1b1' +var2: '#a1a1a1' +``` diff --git a/tests/results/test_namespace/00_6choice_link.adoc b/tests/results/test_namespace/00_6choice_link.adoc new file mode 100644 index 0000000..fdebe94 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_link.adoc @@ -0,0 +1,29 @@ +== Variables for "Rougail" + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `basic` `mandatory` | +The first variable. + +**Choices**: + +* a +* b +* c +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +The second variable. + +**Choices**: + +* a +* b +* c + +**Default**: the value of the variable "rougail.var1". +|==== + diff --git a/tests/results/test_namespace/00_6choice_link.json b/tests/results/test_namespace/00_6choice_link.json new file mode 100644 index 0000000..ef29965 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_link.json @@ -0,0 +1,85 @@ +{ + "rougail": { + "type": "namespace", + "informations": { + "paths": [ + "rougail" + ], + "names": [ + "rougail" + ], + "description": "Rougail", + "properties": [ + { + "type": "mode", + "name": "basic" + } + ] + }, + "children": { + "rougail.var1": { + "type": "variable", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "basic" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": [ + "a", + "b", + "c" + ], + "paths": [ + "rougail.var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "The first variable." + ] + }, + "rougail.var2": { + "type": "variable", + "default": "the value of the variable \"rougail.var1\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": [ + "a", + "b", + "c" + ], + "paths": [ + "rougail.var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "The second variable." + ] + } + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/00_6choice_link.md b/tests/results/test_namespace/00_6choice_link.md new file mode 100644 index 0000000..aaec688 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_link.md @@ -0,0 +1,7 @@ +# Variables for "Rougail" + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `mandatory` | The first variable.<br/>**Choices**: <br/>- a<br/>- b<br/>- c | +| **rougail.var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | The second variable.<br/>**Choices**: <br/>- a<br/>- b<br/>- c<br/>**Default**: the value of the variable "rougail.var1". | + diff --git a/tests/results/test_namespace/00_6choice_link.sh b/tests/results/test_namespace/00_6choice_link.sh new file mode 100644 index 0000000..0432916 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_link.sh @@ -0,0 +1,22 @@ + + +[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mrougail.var1[0m │ The first variable. │ +│ [1;7m choice [0m [1;7m basic [0m [1;7m mandatory [0m │ [1mChoices[0m: │ +│ │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mrougail.var2[0m │ The second variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: │ +│ │ - a │ +│ │ - b │ +│ │ - c │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "rougail.var1". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_namespace/00_6choice_variable_link.adoc b/tests/results/test_namespace/00_6choice_variable_link.adoc new file mode 100644 index 0000000..349046e --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link.adoc @@ -0,0 +1,31 @@ +== Variables for "Rougail" + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` | +A second variable. + +**Default**: + +* a +* b +* c +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A first variable. + +**Choices**: the value of the variable "rougail.var1". + +**Default**: a +| + +**rougail.var3** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A third variable. + +**Choices**: the value of the variable "rougail.var1". + +**Default**: the value of the variable "rougail.var2". +|==== + diff --git a/tests/results/test_namespace/00_6choice_variable_link.json b/tests/results/test_namespace/00_6choice_variable_link.json new file mode 100644 index 0000000..e588754 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link.json @@ -0,0 +1,117 @@ +{ + "rougail": { + "type": "namespace", + "informations": { + "paths": [ + "rougail" + ], + "names": [ + "rougail" + ], + "description": "Rougail", + "properties": [ + { + "type": "mode", + "name": "standard" + } + ] + }, + "children": { + "rougail.var1": { + "type": "variable", + "default": [ + "a", + "b", + "c" + ], + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + }, + { + "type": "property", + "name": "unique" + }, + { + "type": "multiple", + "name": "multiple" + } + ], + "paths": [ + "rougail.var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A second variable." + ] + }, + "rougail.var2": { + "type": "variable", + "default": "a", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"rougail.var1\".", + "paths": [ + "rougail.var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A first variable." + ] + }, + "rougail.var3": { + "type": "variable", + "default": "the value of the variable \"rougail.var2\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"rougail.var1\".", + "paths": [ + "rougail.var3" + ], + "names": [ + "var3" + ], + "descriptions": [ + "A third variable." + ] + } + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/00_6choice_variable_link.md b/tests/results/test_namespace/00_6choice_variable_link.md new file mode 100644 index 0000000..be9e5d1 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link.md @@ -0,0 +1,8 @@ +# Variables for "Rougail" + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A second variable.<br/>**Default**: <br/>- a<br/>- b<br/>- c | +| **rougail.var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Choices**: the value of the variable "rougail.var1".<br/>**Default**: a | +| **rougail.var3**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Choices**: the value of the variable "rougail.var1".<br/>**Default**: the value of the variable "rougail.var2". | + diff --git a/tests/results/test_namespace/00_6choice_variable_link.sh b/tests/results/test_namespace/00_6choice_variable_link.sh new file mode 100644 index 0000000..219dd8f --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link.sh @@ -0,0 +1,25 @@ + + +[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mrougail.var1[0m │ A second variable. │ +│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: │ +│ [1;7munique [0m [1;7m multiple [0m │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mrougail.var2[0m │ A first variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "rougail.var1". │ +│ │ [1mDefault[0m: a │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mrougail.var3[0m │ A third variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "rougail.var1". │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "rougail.var2". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_namespace/00_6choice_variable_link2.adoc b/tests/results/test_namespace/00_6choice_variable_link2.adoc new file mode 100644 index 0000000..ed53597 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link2.adoc @@ -0,0 +1,40 @@ +== Variables for "Rougail" + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[string]` `standard` `mandatory` `unique` `multiple` | +A second variable. + +**Default**: + +* a +* b +* c +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A first variable. + +**Choices**: the value of the variable "rougail.var1". + +**Default**: a +|==== + +=== rougail.family + +`standard` + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.family.var3** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[choice]` `standard` `mandatory` | +A third variable. + +**Choices**: the value of the variable "rougail.family.var1". + +**Default**: the value of the variable "rougail.var2". +|==== + diff --git a/tests/results/test_namespace/00_6choice_variable_link2.json b/tests/results/test_namespace/00_6choice_variable_link2.json new file mode 100644 index 0000000..a2d9e34 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link2.json @@ -0,0 +1,136 @@ +{ + "rougail": { + "type": "namespace", + "informations": { + "paths": [ + "rougail" + ], + "names": [ + "rougail" + ], + "description": "Rougail", + "properties": [ + { + "type": "mode", + "name": "standard" + } + ] + }, + "children": { + "rougail.var1": { + "type": "variable", + "default": [ + "a", + "b", + "c" + ], + "properties": [ + { + "type": "type", + "name": "string" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + }, + { + "type": "property", + "name": "unique" + }, + { + "type": "multiple", + "name": "multiple" + } + ], + "paths": [ + "rougail.var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A second variable." + ] + }, + "rougail.var2": { + "type": "variable", + "default": "a", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"rougail.var1\".", + "paths": [ + "rougail.var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A first variable." + ] + }, + "family": { + "type": "family", + "informations": { + "paths": [ + "rougail.family" + ], + "names": [ + "family" + ], + "properties": [ + { + "type": "mode", + "name": "standard" + } + ] + }, + "children": { + "rougail.family.var3": { + "type": "variable", + "default": "the value of the variable \"rougail.var2\".", + "properties": [ + { + "type": "type", + "name": "choice" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "choices": "the value of the variable \"rougail.family.var1\".", + "paths": [ + "rougail.family.var3" + ], + "names": [ + "var3" + ], + "descriptions": [ + "A third variable." + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/00_6choice_variable_link2.md b/tests/results/test_namespace/00_6choice_variable_link2.md new file mode 100644 index 0000000..37698e7 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link2.md @@ -0,0 +1,15 @@ +# Variables for "Rougail" + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**<br/>[`string`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` `unique` `multiple` | A second variable.<br/>**Default**: <br/>- a<br/>- b<br/>- c | +| **rougail.var2**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Choices**: the value of the variable "rougail.var1".<br/>**Default**: a | + +## rougail.family + +`standard` + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.family.var3**<br/>[`choice`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A third variable.<br/>**Choices**: the value of the variable "rougail.family.var1".<br/>**Default**: the value of the variable "rougail.var2". | + diff --git a/tests/results/test_namespace/00_6choice_variable_link2.sh b/tests/results/test_namespace/00_6choice_variable_link2.sh new file mode 100644 index 0000000..1fe0345 --- /dev/null +++ b/tests/results/test_namespace/00_6choice_variable_link2.sh @@ -0,0 +1,36 @@ + + +[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mrougail.var1[0m │ A second variable. │ +│ [1;7m string [0m [1;7m standard [0m [1;7m mandatory [0m [1;7m [0m │ [1mDefault[0m: │ +│ [1;7munique [0m [1;7m multiple [0m │ - a │ +│ │ - b │ +│ │ - c │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mrougail.var2[0m │ A first variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "rougail.var1". │ +│ │ [1mDefault[0m: a │ +└───────────────────────────────────────┴──────────────────────────────────────┘ + + + [1;4;92mrougail.family[0m + + +[1;7m standard [0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mrougail.family.var3[0m │ A third variable. │ +│ [1;7m choice [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mChoices[0m: the value of the variable │ +│ │ "rougail.family.var1". │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "rougail.var2". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_namespace/00_6regexp_link.adoc b/tests/results/test_namespace/00_6regexp_link.adoc new file mode 100644 index 0000000..e0e5516 --- /dev/null +++ b/tests/results/test_namespace/00_6regexp_link.adoc @@ -0,0 +1,25 @@ +== Variables for "Rougail" + +[cols="1a,1a"] +|==== +| Variable | Description +| + +**rougail.var1** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[regexp]` `standard` `mandatory` | +A first variable. + +**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$" + +**Default**: #a1a1a1 + +**Examples**: + +* '#b1b1b1' +* '#b2b2b2' +| + +**rougail.var2** + +`https://rougail.readthedocs.io/en/latest/variable.html#variables-types[regexp]` `standard` `mandatory` | +A second variable. + +**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$" + +**Default**: the value of the variable "rougail.var1". +|==== + diff --git a/tests/results/test_namespace/00_6regexp_link.json b/tests/results/test_namespace/00_6regexp_link.json new file mode 100644 index 0000000..aa0e43c --- /dev/null +++ b/tests/results/test_namespace/00_6regexp_link.json @@ -0,0 +1,86 @@ +{ + "rougail": { + "type": "namespace", + "informations": { + "paths": [ + "rougail" + ], + "names": [ + "rougail" + ], + "description": "Rougail", + "properties": [ + { + "type": "mode", + "name": "standard" + } + ] + }, + "children": { + "rougail.var1": { + "type": "variable", + "default": "#a1a1a1", + "properties": [ + { + "type": "type", + "name": "regexp" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "validators": [ + "text based with regular expressions \"^#(?:[0-9a-f]{3}){1,2}$\"" + ], + "paths": [ + "rougail.var1" + ], + "names": [ + "var1" + ], + "descriptions": [ + "A first variable." + ], + "examples": [ + "#b1b1b1", + "#b2b2b2" + ] + }, + "rougail.var2": { + "type": "variable", + "default": "the value of the variable \"rougail.var1\".", + "properties": [ + { + "type": "type", + "name": "regexp" + }, + { + "type": "mode", + "name": "standard" + }, + { + "type": "property", + "name": "mandatory" + } + ], + "validators": [ + "text based with regular expressions \"^#(?:[0-9a-f]{3}){1,2}$\"" + ], + "paths": [ + "rougail.var2" + ], + "names": [ + "var2" + ], + "descriptions": [ + "A second variable." + ] + } + } + } +} \ No newline at end of file diff --git a/tests/results/test_namespace/00_6regexp_link.md b/tests/results/test_namespace/00_6regexp_link.md new file mode 100644 index 0000000..13dbf94 --- /dev/null +++ b/tests/results/test_namespace/00_6regexp_link.md @@ -0,0 +1,7 @@ +# Variables for "Rougail" + +| Variable | Description | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **rougail.var1**<br/>[`regexp`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A first variable.<br/>**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$"<br/>**Default**: #a1a1a1<br/>**Examples**: <br/>- #b1b1b1<br/>- #b2b2b2 | +| **rougail.var2**<br/>[`regexp`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `standard` `mandatory` | A second variable.<br/>**Validator**: text based with regular expressions "^#(?:[0-9a-f]{3}){1,2}$"<br/>**Default**: the value of the variable "rougail.var1". | + diff --git a/tests/results/test_namespace/00_6regexp_link.sh b/tests/results/test_namespace/00_6regexp_link.sh new file mode 100644 index 0000000..8f47570 --- /dev/null +++ b/tests/results/test_namespace/00_6regexp_link.sh @@ -0,0 +1,24 @@ + + +[1;4;96mVariables for [0m[1;4;96m"Rougail"[0m + + +┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ +┃[1m [0m[1mVariable [0m[1m [0m┃[1m [0m[1mDescription [0m[1m [0m┃ +┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩ +│ [1mrougail.var1[0m │ A first variable. │ +│ [1;7m regexp [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mValidator[0m: text based with regular │ +│ │ expressions │ +│ │ "^#(?:[0-9a-f]{3}){1,2}$" │ +│ │ [1mDefault[0m: #a1a1a1 │ +│ │ [1mExamples[0m: │ +│ │ - #b1b1b1 │ +│ │ - #b2b2b2 │ +├───────────────────────────────────────┼──────────────────────────────────────┤ +│ [1mrougail.var2[0m │ A second variable. │ +│ [1;7m regexp [0m [1;7m standard [0m [1;7m mandatory [0m │ [1mValidator[0m: text based with regular │ +│ │ expressions │ +│ │ "^#(?:[0-9a-f]{3}){1,2}$" │ +│ │ [1mDefault[0m: the value of the variable │ +│ │ "rougail.var1". │ +└───────────────────────────────────────┴──────────────────────────────────────┘ diff --git a/tests/results/test_namespace_examples/00_6choice_link.md b/tests/results/test_namespace_examples/00_6choice_link.md new file mode 100644 index 0000000..dd808a9 --- /dev/null +++ b/tests/results/test_namespace_examples/00_6choice_link.md @@ -0,0 +1,15 @@ +# Example with mandatory variables not filled in + +```yaml +--- +rougail: + var1: a_choice +``` +# Example with all variables modifiable + +```yaml +--- +rougail: + var1: a_choice + var2: a_choice +``` diff --git a/tests/results/test_namespace_examples/00_6choice_variable_link.md b/tests/results/test_namespace_examples/00_6choice_variable_link.md new file mode 100644 index 0000000..556689a --- /dev/null +++ b/tests/results/test_namespace_examples/00_6choice_variable_link.md @@ -0,0 +1,12 @@ +# Example with all variables modifiable + +```yaml +--- +rougail: + var1: + - a + - b + - c + var2: a + var3: a +``` diff --git a/tests/results/test_namespace_examples/00_6choice_variable_link2.md b/tests/results/test_namespace_examples/00_6choice_variable_link2.md new file mode 100644 index 0000000..3664d7f --- /dev/null +++ b/tests/results/test_namespace_examples/00_6choice_variable_link2.md @@ -0,0 +1,13 @@ +# Example with all variables modifiable + +```yaml +--- +rougail: + var1: + - a + - b + - c + var2: a + family: + var3: a +``` diff --git a/tests/results/test_namespace_examples/00_6regexp_link.md b/tests/results/test_namespace_examples/00_6regexp_link.md new file mode 100644 index 0000000..6d20069 --- /dev/null +++ b/tests/results/test_namespace_examples/00_6regexp_link.md @@ -0,0 +1,8 @@ +# Example with all variables modifiable + +```yaml +--- +rougail: + var1: '#b1b1b1' + var2: '#a1a1a1' +```