Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tpl/cast/init_test.go38
-rw-r--r--tpl/collections/init_test.go38
-rw-r--r--tpl/compare/init_test.go38
-rw-r--r--tpl/crypto/init_test.go38
-rw-r--r--tpl/data/init_test.go38
-rw-r--r--tpl/encoding/init_test.go38
-rw-r--r--tpl/fmt/init_test.go38
-rw-r--r--tpl/images/init_test.go38
-rw-r--r--tpl/inflect/init_test.go38
-rw-r--r--tpl/lang/init_test.go38
-rw-r--r--tpl/math/init_test.go38
-rw-r--r--tpl/os/init_test.go38
-rw-r--r--tpl/partials/init_test.go38
-rw-r--r--tpl/safe/init_test.go38
-rw-r--r--tpl/strings/init_test.go38
-rw-r--r--tpl/time/init_test.go38
-rw-r--r--tpl/transform/init_test.go38
-rw-r--r--tpl/urls/init_test.go38
18 files changed, 684 insertions, 0 deletions
diff --git a/tpl/cast/init_test.go b/tpl/cast/init_test.go
new file mode 100644
index 000000000..22051495a
--- /dev/null
+++ b/tpl/cast/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package cast
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/collections/init_test.go b/tpl/collections/init_test.go
new file mode 100644
index 000000000..1066caeaa
--- /dev/null
+++ b/tpl/collections/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package collections
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/compare/init_test.go b/tpl/compare/init_test.go
new file mode 100644
index 000000000..610c0e5cb
--- /dev/null
+++ b/tpl/compare/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package compare
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/crypto/init_test.go b/tpl/crypto/init_test.go
new file mode 100644
index 000000000..20c0201e5
--- /dev/null
+++ b/tpl/crypto/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package crypto
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/data/init_test.go b/tpl/data/init_test.go
new file mode 100644
index 000000000..f912560c4
--- /dev/null
+++ b/tpl/data/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package data
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/encoding/init_test.go b/tpl/encoding/init_test.go
new file mode 100644
index 000000000..f10f4b1f8
--- /dev/null
+++ b/tpl/encoding/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package encoding
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/fmt/init_test.go b/tpl/fmt/init_test.go
new file mode 100644
index 000000000..9b71381d6
--- /dev/null
+++ b/tpl/fmt/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package fmt
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/images/init_test.go b/tpl/images/init_test.go
new file mode 100644
index 000000000..d4fc65484
--- /dev/null
+++ b/tpl/images/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package images
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/inflect/init_test.go b/tpl/inflect/init_test.go
new file mode 100644
index 000000000..741e8f797
--- /dev/null
+++ b/tpl/inflect/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package inflect
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/lang/init_test.go b/tpl/lang/init_test.go
new file mode 100644
index 000000000..8a03d18eb
--- /dev/null
+++ b/tpl/lang/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package lang
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/math/init_test.go b/tpl/math/init_test.go
new file mode 100644
index 000000000..70a8e3c96
--- /dev/null
+++ b/tpl/math/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package math
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/os/init_test.go b/tpl/os/init_test.go
new file mode 100644
index 000000000..53d4c6920
--- /dev/null
+++ b/tpl/os/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package os
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/partials/init_test.go b/tpl/partials/init_test.go
new file mode 100644
index 000000000..b841f2151
--- /dev/null
+++ b/tpl/partials/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package partials
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/safe/init_test.go b/tpl/safe/init_test.go
new file mode 100644
index 000000000..e18c5b12c
--- /dev/null
+++ b/tpl/safe/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package safe
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/strings/init_test.go b/tpl/strings/init_test.go
new file mode 100644
index 000000000..5b7616406
--- /dev/null
+++ b/tpl/strings/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package strings
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/time/init_test.go b/tpl/time/init_test.go
new file mode 100644
index 000000000..a41d8e4f3
--- /dev/null
+++ b/tpl/time/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package time
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/transform/init_test.go b/tpl/transform/init_test.go
new file mode 100644
index 000000000..26f81d7f1
--- /dev/null
+++ b/tpl/transform/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package transform
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}
diff --git a/tpl/urls/init_test.go b/tpl/urls/init_test.go
new file mode 100644
index 000000000..f619b2c00
--- /dev/null
+++ b/tpl/urls/init_test.go
@@ -0,0 +1,38 @@
+// Copyright 2017 The Hugo Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package urls
+
+import (
+ "testing"
+
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/tpl/internal"
+ "github.com/stretchr/testify/require"
+)
+
+func TestInit(t *testing.T) {
+ var found bool
+ var ns *internal.TemplateFuncsNamespace
+
+ for _, nsf := range internal.TemplateFuncsNamespaceRegistry {
+ ns = nsf(&deps.Deps{})
+ if ns.Name == name {
+ found = true
+ break
+ }
+ }
+
+ require.True(t, found)
+ require.IsType(t, &Namespace{}, ns.Context.(func() interface{})())
+}