mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Allowing empty files (ignored) so you can touch a new file while watching
This commit is contained in:
parent
1c60d5bf20
commit
8055838c70
2 changed files with 3 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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},
|
||||
|
|
Loading…
Reference in a new issue