lib/generators: add mkValueString to mkKeyValueDefault generator

This means the generation of values can now be influenced, even down from e.g.
an INI generator.
Breaks the interface of `mkKeyValueDefault` to match its interface to other
generator functions. It might me sensible to rename `mkKeyValue` and
`mkKeyValueSet` to conform to the `toX`-style of generator functions.
This commit is contained in:
Profpatsch
2017-11-09 15:58:14 +01:00
parent f09f49d483
commit 8e00dcd242
2 changed files with 10 additions and 6 deletions

View File

@@ -201,7 +201,7 @@ runTests {
# in alphabetical order
testMkKeyValueDefault = {
expr = generators.mkKeyValueDefault ":" "f:oo" "bar";
expr = generators.mkKeyValueDefault {} ":" "f:oo" "bar";
expected = ''f\:oo:bar'';
};