diff --git a/src/Tomlyn.Tests/ModelTests.cs b/src/Tomlyn.Tests/ModelTests.cs index 8d2a6a2..17ee329 100644 --- a/src/Tomlyn.Tests/ModelTests.cs +++ b/src/Tomlyn.Tests/ModelTests.cs @@ -64,6 +64,31 @@ public static void TestBasic() Assert.AreEqual("yo", subTable["d"]); } + [Test] + public void TestShortDateKey() + { + var input = "2018-01-01=123"; + + var syntax = Toml.Parse(input); + Assert.False(syntax.HasErrors, "The document should not have any errors"); + + var model = syntax.ToModel(); + Assert.True(model.ContainsKey("2018-01-01")); + } + + + [Test] + public void TestFullDateKey() + { + var input = "\"1987-07-05T17:45:00Z\"=123"; + + var syntax = Toml.Parse(input); + Assert.False(syntax.HasErrors, "The document should not have any errors"); + + var model = syntax.ToModel(); + Assert.True(model.ContainsKey("1987-07-05T17:45:00Z")); + } + [Test] public static void TestTable() {