Allow space to separate date and time (#300)

Fixes #231
This commit is contained in:
Marcin Białoń
2019-09-19 19:45:53 +02:00
committed by Thomas Pelletier
parent ec312409d3
commit 095a905e04
4 changed files with 22 additions and 2 deletions
+7
View File
@@ -225,6 +225,13 @@ func TestDateNano(t *testing.T) {
})
}
func TestDateSpaceDelimiter(t *testing.T) {
tree, err := Load("odt4 = 1979-05-27 07:32:00Z")
assertTree(t, tree, err, map[string]interface{}{
"odt4": time.Date(1979, time.May, 27, 7, 32, 0, 0, time.UTC),
})
}
func TestSimpleString(t *testing.T) {
tree, err := Load("a = \"hello world\"")
assertTree(t, tree, err, map[string]interface{}{