diff --git a/source/mirage/config.d b/source/mirage/config.d index d20df5c..7cf4655 100644 --- a/source/mirage/config.d +++ b/source/mirage/config.d @@ -350,7 +350,7 @@ class ConfigDictionary { private string substituteEnvVars(ValueNode valueNode) { auto value = valueNode.value; if (value == null) { - return value; //todo test + return value; } auto result = ""; @@ -707,6 +707,12 @@ version (unittest) { assert(config.get("bla") == " blergh "); } + @("Null value stays null, not string") + unittest { + auto config = new ConfigDictionary(new ValueNode(null)); + assert(config.get(".") == null); + } + @("Read value from environment variable") unittest { environment["MIRAGE_CONFIG_TEST_ENV_VAR"] = "is set!";