mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-13 20:24:00 +02:00
transform: Add missing test case for NewEmptyTransforms
This commit is contained in:
@@ -16,6 +16,7 @@ package transform
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/spf13/hugo/helpers"
|
"github.com/spf13/hugo/helpers"
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
@@ -211,6 +212,11 @@ func TestXMLAbsURL(t *testing.T) {
|
|||||||
apply(t.Errorf, tr, xml_abs_url_tests)
|
apply(t.Errorf, tr, xml_abs_url_tests)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestNewEmptyTransforms(t *testing.T) {
|
||||||
|
transforms := NewEmptyTransforms()
|
||||||
|
assert.Equal(t, 20, cap(transforms))
|
||||||
|
}
|
||||||
|
|
||||||
type errorf func(string, ...interface{})
|
type errorf func(string, ...interface{})
|
||||||
|
|
||||||
func applyWithPath(ef errorf, tr chain, tests []test, path string) {
|
func applyWithPath(ef errorf, tr chain, tests []test, path string) {
|
||||||
|
Reference in New Issue
Block a user