condition and check
This commit is contained in:
29
tests/flattener_dicos_hum/01fill_context/00-base.xml
Normal file
29
tests/flattener_dicos_hum/01fill_context/00-base.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
|
||||
<containers/>
|
||||
|
||||
<variables>
|
||||
<family name="general">
|
||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change" hidden="True">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
<variable name="mode_conteneur_actif1" type="oui/non" description="No change">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<fill name="get_zone_name_bridge" target="mode_conteneur_actif1">
|
||||
<param type="eole" name="nom_carte">mode_conteneur_actif</param>
|
||||
<param type="context" name="context"/>
|
||||
</fill>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</creole>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1 @@
|
||||
{"creole.general.mode_conteneur_actif1": null}
|
29
tests/flattener_dicos_hum/01fill_context/result/00-base.xml
Normal file
29
tests/flattener_dicos_hum/01fill_context/result/00-base.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
<family doc="" name="creole">
|
||||
<family doc="general" name="general">
|
||||
<property>normal</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>force_default_on_freeze</property>
|
||||
<property>frozen</property>
|
||||
<property>hidden</property>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value type="string">non</value>
|
||||
</variable>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif1" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value name="get_zone_name_bridge" type="calculation">
|
||||
<param hidden="True" name="nom_carte" type="eole">creole.general.mode_conteneur_actif</param>
|
||||
<param hidden="True" name="context" type="context"/>
|
||||
</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
</creole>
|
@ -0,0 +1,33 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
|
||||
<containers/>
|
||||
|
||||
<variables>
|
||||
<family name="general" mode="expert">
|
||||
<variable name="mode_conteneur_actif" type="oui/non" description="No change">
|
||||
<value>non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family name="enumfam" mode="expert">
|
||||
<variable name="enumvar" type="string" description="multi">
|
||||
<value>c</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="enumvar">
|
||||
<param>['a', 'b', 'c', 'é']</param>
|
||||
<param name="checkval">False</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
<help>
|
||||
<variable name="enumvar">bla bla bla</variable>
|
||||
</help>
|
||||
|
||||
</creole>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1 @@
|
||||
{"creole.general.mode_conteneur_actif": "non", "creole.enumfam.enumvar": "a"}
|
@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
<constraints>
|
||||
<check name="valid_enum" target="creole.enumfam.enumvar" transitive="True" warnings_only="False">
|
||||
<param type="string">['a', 'b', 'c', 'é']</param>
|
||||
</check>
|
||||
</constraints>
|
||||
<family doc="" name="creole">
|
||||
<family doc="general" name="general">
|
||||
<property>expert</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="choice">
|
||||
<choice type="string">oui</choice>
|
||||
<choice type="string">non</choice>
|
||||
<property>mandatory</property>
|
||||
<property>expert</property>
|
||||
<value type="string">non</value>
|
||||
</variable>
|
||||
</family>
|
||||
<family doc="enumfam" name="enumfam">
|
||||
<property>expert</property>
|
||||
<variable doc="multi" help="bla bla bla" multi="False" name="enumvar" type="string">
|
||||
<property>mandatory</property>
|
||||
<property>expert</property>
|
||||
<value>a</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
</creole>
|
24
tests/flattener_dicos_hum/10valid_enum_checkval/00-base.xml
Normal file
24
tests/flattener_dicos_hum/10valid_enum_checkval/00-base.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
|
||||
<containers/>
|
||||
|
||||
<variables>
|
||||
<family name="general">
|
||||
<variable name="mode_conteneur_actif" type="string" description="No change"/>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="mode_conteneur_actif">
|
||||
<param>['a','b','c']</param>
|
||||
<param name="checkval">False</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</creole>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1 @@
|
||||
{"creole.general.mode_conteneur_actif": "a"}
|
@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
<constraints>
|
||||
<check name="valid_enum" target="creole.general.mode_conteneur_actif" transitive="True" warnings_only="False">
|
||||
<param type="string">['a','b','c']</param>
|
||||
</check>
|
||||
</constraints>
|
||||
<family doc="" name="creole">
|
||||
<family doc="general" name="general">
|
||||
<property>normal</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>a</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
</creole>
|
@ -0,0 +1,26 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
|
||||
<containers/>
|
||||
|
||||
<variables>
|
||||
<family name="general">
|
||||
<variable name="mode_conteneur_actif" type="string" description="No change">
|
||||
<value>b</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</variables>
|
||||
|
||||
<constraints>
|
||||
<check name="valid_enum" target="mode_conteneur_actif">
|
||||
<param>['a','b','c']</param>
|
||||
<param name="checkval">False</param>
|
||||
</check>
|
||||
</constraints>
|
||||
|
||||
<help/>
|
||||
|
||||
</creole>
|
||||
<!-- vim: ts=4 sw=4 expandtab
|
||||
-->
|
@ -0,0 +1 @@
|
||||
{"creole.general.mode_conteneur_actif": "a"}
|
@ -0,0 +1,19 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<creole>
|
||||
<constraints>
|
||||
<check name="valid_enum" target="creole.general.mode_conteneur_actif" transitive="True" warnings_only="False">
|
||||
<param type="string">['a','b','c']</param>
|
||||
</check>
|
||||
</constraints>
|
||||
<family doc="" name="creole">
|
||||
<family doc="general" name="general">
|
||||
<property>normal</property>
|
||||
<variable doc="No change" multi="False" name="mode_conteneur_actif" type="string">
|
||||
<property>mandatory</property>
|
||||
<property>normal</property>
|
||||
<value>a</value>
|
||||
</variable>
|
||||
</family>
|
||||
<separators/>
|
||||
</family>
|
||||
</creole>
|
Reference in New Issue
Block a user