summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-01-03 17:28:51 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-01-07 17:06:35 +0100
commit45e3ed517a17648d54e8ce33618a8f251cfec603 (patch)
tree160a1bbd03a107be08ae76018fb382268365e2a1 /hugolib/shortcode_test.go
parent24a286791f37cbf6638b37f29386949045d0bba2 (diff)
all: Refactor to non-global logger
Note that this looks like overkill for just the logger, and that is correct, but this will make sense once we start with the template handling etc. Updates #2701
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index e7fbe7567..01cdd97ae 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -33,7 +33,7 @@ import (
// TODO(bep) remove
func pageFromString(in, filename string) (*Page, error) {
- return NewPageFrom(strings.NewReader(in), filename)
+ return pageTestSite.NewPageFrom(strings.NewReader(in), filename)
}
func CheckShortCodeMatch(t *testing.T, input, expected string, withTemplate func(templ tpl.Template) error) {
@@ -83,7 +83,7 @@ title: "Title"
}
func TestShortcodeGoFuzzReports(t *testing.T) {
- tem := tpl.New()
+ tem := tpl.New(logger)
tem.AddInternalShortcode("sc.html", `foo`)
p, _ := pageFromString(simplePage, "simple.md")
@@ -304,7 +304,7 @@ func TestHighlight(t *testing.T) {
viper.Set("pygmentsStyle", "bw")
viper.Set("pygmentsUseClasses", false)
- templ := tpl.New()
+ templ := tpl.New(logger)
code := `
{{< highlight java >}}
@@ -380,7 +380,7 @@ func TestExtractShortcodes(t *testing.T) {
} {
p, _ := pageFromString(simplePage, "simple.md")
- tem := tpl.New()
+ tem := tpl.New(logger)
tem.AddInternalShortcode("tag.html", `tag`)
tem.AddInternalShortcode("sc1.html", `sc1`)
tem.AddInternalShortcode("sc2.html", `sc2`)
@@ -578,7 +578,7 @@ tags:
}
- sites, err := newHugoSites(s)
+ sites, err := newHugoSites(DepsCfg{}, s)
if err != nil {
t.Fatalf("Failed to build site: %s", err)