ref: 8055838c700d9e8b77ec1dafeda5ecaef2dab2c2
parent: 1c60d5bf2027815fda31d7fa9c1c98033a3c614e
author: spf13 <[email protected]>
date: Sat Dec 28 08:44:58 EST 2013
Allowing empty files (ignored) so you can touch a new file while watching
--- a/hugolib/page_test.go
+++ b/hugolib/page_test.go
@@ -169,11 +169,11 @@
func TestDegenerateEmptyPage(t *testing.T) {
_, err := ReadFrom(strings.NewReader(EMPTY_PAGE), "test")
- if err == nil {
- t.Fatalf("Expected ReadFrom to return an error when an empty buffer is passed.")
+ if err != nil {
+ t.Fatalf("Empty files should not trigger an error. Should be able to touch a file while watching without erroring out.")
}
- checkError(t, err, "EOF")
+ //checkError(t, err, "EOF")
}
func checkPageTitle(t *testing.T, page *Page, title string) {
--- a/parser/parse_frontmatter_test.go
+++ b/parser/parse_frontmatter_test.go
@@ -52,7 +52,6 @@
tests := []struct {
content string
}{
- {CONTENT_EMPTY},
{CONTENT_MISSING_END_FM_DELIM},
{CONTENT_INCOMPLETE_END_FM_DELIM},
{CONTENT_FM_NO_DOC},