Christian Boltz
0629215f2a
Check for variable names not ending with }
...
... and add a test to ensure that everything works as expected.
Note that broken variable names like '@{foo' match the (quite
permissive) regex, but are invalid nevertheless.
2020-05-27 13:32:44 +02:00
Christian Boltz
6155b356b3
VariableRuleset: add get_merged_variables()
...
This function returns a dict with variables, both definitions (=) and
value additions (+=).
Also add some tests.
2020-05-27 13:32:44 +02:00
Christian Boltz
61db5595aa
VariableRuleset: Prevent re-defining variables
...
When adding a variable with a name that is already known to the
VariableRuleset, raise an exception.
Also add a test for this.
2020-05-27 13:32:43 +02:00
Christian Boltz
39eb1939ba
Split variables
...
... and enable tests related to this
2020-05-27 13:32:43 +02:00
Christian Boltz
1eb9791ed7
move separate_vars() from aa.py to VariableRule
...
... and also move its tests to test-variable.py
2020-05-27 13:32:43 +02:00
Christian Boltz
215ec38ae3
Add VariableRule and VariableRuleset
...
... and a set of tests for them.
Note that the tests include some TODOs, these will be handled in the
following commits.
2020-05-27 13:32:43 +02:00