Skip to content

Commit

Permalink
[test] re #233: add test to reproduce
Browse files Browse the repository at this point in the history
  • Loading branch information
biojppm committed Mar 21, 2022
1 parent 213b201 commit 8bf87ba
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/test_simple_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
namespace c4 {
namespace yml {

TEST(simple_map, keys_with_leading_colon)
{
Tree tree = parse_in_arena(R"(
:foo:
:bar: a
:barbar: b
:barbarbar: c
)");
EXPECT_EQ(tree[":foo"][":bar"].val(), "a");
EXPECT_EQ(tree[":foo"][":barbar"].val(), "b");
EXPECT_EQ(tree[":foo"][":barbarbar"].val(), "c");
}

TEST(simple_map, open_on_new_doc_without_space)
{
Tree tree = parse_in_arena(R"(
Expand Down

0 comments on commit 8bf87ba

Please sign in to comment.