Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
Alexander Zhirov | d7341373d4 | |
Alexander Zhirov | 391ba8e797 | |
Alexander Zhirov | e206abd027 |
|
@ -33,7 +33,7 @@ value2 => Take the value in quotation marks
|
|||
value3 => Or take in apostrophes
|
||||
value4 => You can also comment
|
||||
value5 => So you can also comment
|
||||
value6 =>
|
||||
value6 => "And you can even do that!"
|
||||
value7 => 1234567890
|
||||
value8 => 12345.67890
|
||||
value9 => You can use large margins
|
||||
|
|
|
@ -28,7 +28,7 @@ private:
|
|||
*/
|
||||
@property bool empty()
|
||||
{
|
||||
return this.property.length = 0;
|
||||
return this.property.length == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,7 +84,7 @@ private:
|
|||
{
|
||||
if (match[group][0] == '\'')
|
||||
group = 10;
|
||||
if (match[group][0] == '\"')
|
||||
else if (match[group][0] == '\"')
|
||||
group = 8;
|
||||
}
|
||||
this.properties[match[1]] = PP(match[1], match[group]);
|
||||
|
|
|
@ -9,15 +9,12 @@ unittest
|
|||
assert(Config.file.key("value3") == "Or take in apostrophes");
|
||||
assert(Config.file.key("value4") == "You can also comment");
|
||||
assert(Config.file.key("value5") == "So you can also comment");
|
||||
// assert(Config.file.key("value6") == "\"And you can even do that!\"");
|
||||
assert(Config.file.key("value6") == ""); // D unable to read quotes
|
||||
assert(Config.file.key("value6") == "\"And you can even do that!\"");
|
||||
assert(Config.file.key("value7") == "1234567890");
|
||||
assert(Config.file.key("value8") == "12345.67890");
|
||||
assert(Config.file.key("value9") == "You can use large margins");
|
||||
assert(!Config.file.key("value10").empty);
|
||||
assert(Config.file.key("value10") == "");
|
||||
assert(!Config.file.key("value11").empty);
|
||||
assert(Config.file.key("value11") == "");
|
||||
assert(Config.file.key("value10").empty);
|
||||
assert(Config.file.key("value11").empty);
|
||||
assert(Config.file.key("value12") == "//path");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue