From f4737689bd3d9f73129cf3615025aafb93d0efbe Mon Sep 17 00:00:00 2001 From: spf13 Date: Sat, 31 Jan 2015 01:06:04 -0500 Subject: [PATCH] Updating shortcode imports & site test to work with new buffer pool functions --- hugolib/shortcode.go | 1 - hugolib/site_test.go | 9 +++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go index 1e9fdd877..0bdfcd5a5 100644 --- a/hugolib/shortcode.go +++ b/hugolib/shortcode.go @@ -14,7 +14,6 @@ package hugolib import ( - "bytes" "fmt" "html/template" "reflect" diff --git a/hugolib/site_test.go b/hugolib/site_test.go index 798bc8c60..0ab543ef1 100644 --- a/hugolib/site_test.go +++ b/hugolib/site_test.go @@ -178,19 +178,16 @@ func TestRenderThingOrDefault(t *testing.T) { } var err2 error - var b io.Reader + if test.missing { - b, err2 = s.renderPage("name", p, "missing", templateName) + err2 = s.renderAndWritePage("name", "out", p, "missing", templateName) } else { - b, err2 = s.renderPage("name", p, templateName, "missing_default") + err2 = s.renderAndWritePage("name", "out", p, templateName, "missing_default") } if err2 != nil { t.Errorf("Unable to render html: %s", err) } - if err2 := s.WriteDestPage("out", b); err2 != nil { - t.Errorf("Unable to write html: %s", err) - } file, err := hugofs.DestinationFS.Open(filepath.FromSlash("out/index.html")) if err != nil {