mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Updating shortcode imports & site test to work with new buffer pool functions
This commit is contained in:
parent
e1e6aaed2f
commit
f4737689bd
2 changed files with 3 additions and 7 deletions
|
@ -14,7 +14,6 @@
|
||||||
package hugolib
|
package hugolib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
|
@ -178,19 +178,16 @@ func TestRenderThingOrDefault(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var err2 error
|
var err2 error
|
||||||
var b io.Reader
|
|
||||||
if test.missing {
|
if test.missing {
|
||||||
b, err2 = s.renderPage("name", p, "missing", templateName)
|
err2 = s.renderAndWritePage("name", "out", p, "missing", templateName)
|
||||||
} else {
|
} else {
|
||||||
b, err2 = s.renderPage("name", p, templateName, "missing_default")
|
err2 = s.renderAndWritePage("name", "out", p, templateName, "missing_default")
|
||||||
}
|
}
|
||||||
|
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
t.Errorf("Unable to render html: %s", err)
|
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"))
|
file, err := hugofs.DestinationFS.Open(filepath.FromSlash("out/index.html"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue