Fix raw TOML dates in where/eq

Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter
dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib.

Fixes #9979
This commit is contained in:
Bjørn Erik Pedersen
2022-06-06 09:48:40 +02:00
parent 534e7155bb
commit 0566bbf7c7
18 changed files with 216 additions and 87 deletions

View File

@@ -17,7 +17,9 @@ import (
"reflect"
"testing"
"github.com/gohugoio/hugo/config"
"github.com/gohugoio/hugo/deps"
"github.com/gohugoio/hugo/langs"
qt "github.com/frankban/quicktest"
)
@@ -34,7 +36,7 @@ func TestComplement(t *testing.T) {
c := qt.New(t)
ns := New(&deps.Deps{})
ns := New(&deps.Deps{Language: langs.NewDefaultLanguage(config.New())})
s1 := []TstX{{A: "a"}, {A: "b"}, {A: "d"}, {A: "e"}}
s2 := []TstX{{A: "b"}, {A: "e"}}