mirror of
https://github.com/mbierlee/mirage-config.git
synced 2024-11-15 04:44:01 +01:00
Add null value test
This commit is contained in:
parent
f0d5f34390
commit
8389d75958
|
@ -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!";
|
||||
|
|
Loading…
Reference in a new issue