diff options
Diffstat (limited to 'tpl/compare/compare_test.go')
-rw-r--r-- | tpl/compare/compare_test.go | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tpl/compare/compare_test.go b/tpl/compare/compare_test.go index 61a84a629..d83680e53 100644 --- a/tpl/compare/compare_test.go +++ b/tpl/compare/compare_test.go @@ -21,8 +21,7 @@ import ( "testing" "time" - "github.com/gohugoio/hugo/helpers" - + "github.com/gohugoio/hugo/common/hugo" "github.com/spf13/cast" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -173,17 +172,17 @@ func doTestCompare(t *testing.T, tp tstCompareType, funcUnderTest func(a, b inte {tstEqerType1("a"), tstEqerType2("a"), 0}, {tstEqerType2("a"), tstEqerType1("a"), 0}, {tstEqerType2("a"), tstEqerType1("b"), -1}, - {helpers.MustParseHugoVersion("0.32.1").Version(), helpers.MustParseHugoVersion("0.32").Version(), 1}, - {helpers.MustParseHugoVersion("0.35").Version(), helpers.MustParseHugoVersion("0.32").Version(), 1}, - {helpers.MustParseHugoVersion("0.36").Version(), helpers.MustParseHugoVersion("0.36").Version(), 0}, - {helpers.MustParseHugoVersion("0.32").Version(), helpers.MustParseHugoVersion("0.36").Version(), -1}, - {helpers.MustParseHugoVersion("0.32").Version(), "0.36", -1}, - {"0.36", helpers.MustParseHugoVersion("0.32").Version(), 1}, - {"0.36", helpers.MustParseHugoVersion("0.36").Version(), 0}, - {"0.37", helpers.MustParseHugoVersion("0.37-DEV").Version(), 1}, - {"0.37-DEV", helpers.MustParseHugoVersion("0.37").Version(), -1}, - {"0.36", helpers.MustParseHugoVersion("0.37-DEV").Version(), -1}, - {"0.37-DEV", helpers.MustParseHugoVersion("0.37-DEV").Version(), 0}, + {hugo.MustParseVersion("0.32.1").Version(), hugo.MustParseVersion("0.32").Version(), 1}, + {hugo.MustParseVersion("0.35").Version(), hugo.MustParseVersion("0.32").Version(), 1}, + {hugo.MustParseVersion("0.36").Version(), hugo.MustParseVersion("0.36").Version(), 0}, + {hugo.MustParseVersion("0.32").Version(), hugo.MustParseVersion("0.36").Version(), -1}, + {hugo.MustParseVersion("0.32").Version(), "0.36", -1}, + {"0.36", hugo.MustParseVersion("0.32").Version(), 1}, + {"0.36", hugo.MustParseVersion("0.36").Version(), 0}, + {"0.37", hugo.MustParseVersion("0.37-DEV").Version(), 1}, + {"0.37-DEV", hugo.MustParseVersion("0.37").Version(), -1}, + {"0.36", hugo.MustParseVersion("0.37-DEV").Version(), -1}, + {"0.37-DEV", hugo.MustParseVersion("0.37-DEV").Version(), 0}, } { result := funcUnderTest(test.left, test.right) success := false |