Skip to content

Commit

Permalink
test: add valid tests
Browse files Browse the repository at this point in the history
  • Loading branch information
o3o committed Jun 7, 2023
1 parent c00b76d commit aa17362
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/ut/toml.d
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ unittest {
doc["bare-key"].should == "value";
doc["1234"].should == "value";
}

@("quoted keys")
@safe
unittest {
Expand Down
24 changes: 24 additions & 0 deletions tests/ut/valid.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module ut.valid;

import unit_threaded;
import toml;


@("issue5")
@ShouldFail("to be fixed: see https://github.com/dlang-community/toml/issues/5")
@safe
unittest {
enum T =`
[[override]]
a = 30
[override.symbols]
"S.f" = 30
[[override]]
a = 40
[override.symbols]
"S.f" = 25 `;
TOMLDocument doc = parseTOML(T);
}
1 change: 1 addition & 0 deletions tests/ut_main.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ int main(string[] args) {
return runTests!(
"ut.toml",
"ut.invalid",
"ut.valid",
"toml.serialize",
"toml.toml",
)(args);
Expand Down

0 comments on commit aa17362

Please sign in to comment.