Allowing empty files (ignored) so you can touch a new file while watching
authorspf13 <steve.francia@gmail.com>
Sat, 28 Dec 2013 18:44:58 +0000 (13:44 -0500)
committerspf13 <steve.francia@gmail.com>
Sat, 28 Dec 2013 18:47:34 +0000 (13:47 -0500)
hugolib/page_test.go
parser/parse_frontmatter_test.go

index a308ecefcb3eeb6cbc6cbdd7b731d952385cb835..78d5797dff0bd2bacd95f7437c335cd82fcdf9c9 100644 (file)
@@ -169,11 +169,11 @@ func TestDegenerateEmptyPageZeroLengthName(t *testing.T) {
 
 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) {
index 87666542a2e5d3ffe7ddf7cc710e4a10beeaa648..ab7d78eb0a8c95dfc9cecbd85a03294a01c1a8ff 100644 (file)
@@ -52,7 +52,6 @@ func TestDegenerateCreatePageFrom(t *testing.T) {
        tests := []struct {
                content string
        }{
-               {CONTENT_EMPTY},
                {CONTENT_MISSING_END_FM_DELIM},
                {CONTENT_INCOMPLETE_END_FM_DELIM},
                {CONTENT_FM_NO_DOC},