mirror of
https://github.com/mbierlee/mirage-config.git
synced 2024-11-15 04:44:01 +01:00
Add multline tests to ini and java
This commit is contained in:
parent
747c5cf0d8
commit
9fa1092e80
|
@ -64,6 +64,8 @@ version (unittest) {
|
||||||
unittest {
|
unittest {
|
||||||
auto config = parseIniConfig("
|
auto config = parseIniConfig("
|
||||||
globalSection = yes
|
globalSection = yes
|
||||||
|
multi = 'we are \\
|
||||||
|
multi!'
|
||||||
|
|
||||||
[supersection]
|
[supersection]
|
||||||
thefirst = here
|
thefirst = here
|
||||||
|
@ -82,6 +84,7 @@ version (unittest) {
|
||||||
");
|
");
|
||||||
|
|
||||||
assert(config.get("globalSection") == "yes");
|
assert(config.get("globalSection") == "yes");
|
||||||
|
assert(config.get("multi") == "we are multi!");
|
||||||
assert(config.get("supersection.thefirst") == "here");
|
assert(config.get("supersection.thefirst") == "here");
|
||||||
assert(config.get("supersection.sub.sandwich") == "maybe tasty");
|
assert(config.get("supersection.sub.sandwich") == "maybe tasty");
|
||||||
assert(config.get("supersection.sub.way.advertisement?") == "nah");
|
assert(config.get("supersection.sub.way.advertisement?") == "nah");
|
||||||
|
|
|
@ -79,6 +79,8 @@ version (unittest) {
|
||||||
much = not much
|
much = not much
|
||||||
much: much !important!!!!!!!!
|
much: much !important!!!!!!!!
|
||||||
empty
|
empty
|
||||||
|
multi = we are \\
|
||||||
|
two lines
|
||||||
");
|
");
|
||||||
|
|
||||||
assert(config.get("bla") == "one");
|
assert(config.get("bla") == "one");
|
||||||
|
@ -86,6 +88,7 @@ version (unittest) {
|
||||||
assert(config.get("meh") == "very");
|
assert(config.get("meh") == "very");
|
||||||
assert(config.get("much") == "much");
|
assert(config.get("much") == "much");
|
||||||
assert(config.get("empty") == "");
|
assert(config.get("empty") == "");
|
||||||
|
assert(config.get("multi") == "we are two lines");
|
||||||
}
|
}
|
||||||
|
|
||||||
@("Parse java properties file")
|
@("Parse java properties file")
|
||||||
|
|
Loading…
Reference in a new issue