diff --git a/hugolib/handler_test.go b/hugolib/handler_test.go index 29b1161e4..ee5913634 100644 --- a/hugolib/handler_test.go +++ b/hugolib/handler_test.go @@ -63,14 +63,14 @@ func TestDefaultHandler(t *testing.T) { doc string expected string }{ - {filepath.FromSlash("sect/doc1.html"), "\n\n
some content
\n"}, + {filepath.FromSlash("sect/doc1.html"), "\n\nsome content
\n"}, {filepath.FromSlash("sect/doc2.html"), "more content"}, - {filepath.FromSlash("sect/doc3.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc3.html"), "\n\nsome content
\n"}, {filepath.FromSlash("sect/doc3/img1.png"), string([]byte("‰PNG ��� IHDR����������:~›U��� IDATWcø��ZMoñ����IEND®B`‚"))}, {filepath.FromSlash("sect/img2.gif"), string([]byte("GIF89a��€��ÿÿÿ���,�������D�;"))}, {filepath.FromSlash("sect/img2.spf"), string([]byte("****FAKE-FILETYPE****"))}, {filepath.FromSlash("doc7.html"), "doc7 content"}, - {filepath.FromSlash("sect/doc8.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc8.html"), "\n\nsome content
\n"}, } for _, test := range tests { diff --git a/hugolib/page_test.go b/hugolib/page_test.go index b492bab2d..c4e442a41 100644 --- a/hugolib/page_test.go +++ b/hugolib/page_test.go @@ -487,7 +487,7 @@ func checkPageTitle(t *testing.T, page *Page, title string) { func checkPageContent(t *testing.T, page *Page, content string) { if page.Content != template.HTML(content) { - t.Fatalf("Page content is: %q\nExpected: %q", page.Content, content) + t.Fatalf("Page content is:\n%q\nExpected:\n%q", page.Content, content) } } @@ -611,8 +611,8 @@ func TestTableOfContents(t *testing.T) { if err != nil { t.Fatalf("Unable to create a page with frontmatter and body content: %s", err) } - checkPageContent(t, p, "\n\nFor some moments the old man did not reply. He stood with bowed head, buried in deep thought. But at last he spoke.
\n\nI have no idea, of course, how long it took me to reach the limit of the plain,\nbut at last I entered the foothills, following a pretty little canyon upward\ntoward the mountains. Beside me frolicked a laughing brooklet, hurrying upon\nits noisy way down to the silent sea. In its quieter pools I discovered many\nsmall fish, of four-or five-pound weight I should imagine. In appearance,\nexcept as to size and color, they were not unlike the whale of our own seas. As\nI watched them playing about I discovered, not only that they suckled their\nyoung, but that at intervals they rose to the surface to breathe as well as to\nfeed upon certain grasses and a strange, scarlet lichen which grew upon the\nrocks just above the water line.
\n\nI remember I felt an extraordinary persuasion that I was being played with,\nthat presently, when I was upon the very verge of safety, this mysterious\ndeath–as swift as the passage of light–would leap after me from the pit about\nthe cylinder and strike me down. ## BB
\n\n“You’re a great Granser,” he cried delightedly, “always making believe them little marks mean something.”
\n") - checkPageTOC(t, p, "") + checkPageContent(t, p, "\n\nFor some moments the old man did not reply. He stood with bowed head, buried in deep thought. But at last he spoke.
\n\nI have no idea, of course, how long it took me to reach the limit of the plain,\nbut at last I entered the foothills, following a pretty little canyon upward\ntoward the mountains. Beside me frolicked a laughing brooklet, hurrying upon\nits noisy way down to the silent sea. In its quieter pools I discovered many\nsmall fish, of four-or five-pound weight I should imagine. In appearance,\nexcept as to size and color, they were not unlike the whale of our own seas. As\nI watched them playing about I discovered, not only that they suckled their\nyoung, but that at intervals they rose to the surface to breathe as well as to\nfeed upon certain grasses and a strange, scarlet lichen which grew upon the\nrocks just above the water line.
\n\nI remember I felt an extraordinary persuasion that I was being played with,\nthat presently, when I was upon the very verge of safety, this mysterious\ndeath–as swift as the passage of light–would leap after me from the pit about\nthe cylinder and strike me down. ## BB
\n\n“You’re a great Granser,” he cried delightedly, “always making believe them little marks mean something.”
\n") + checkPageTOC(t, p, "") } func TestPageWithMoreTag(t *testing.T) { diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index ab764b845..39a5ae39d 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -176,7 +176,7 @@ func TestInnerSCWithMarkdown(t *testing.T) { [link](http://spf13.com) and text -{{% /inside %}}`, "link and text
\nlink and text
\nlink and text
\nlink and text
\ntext
\n\nmore text
\n"}, + {pageWithMd, templateContent, "\n\ntext
\n\nmore text
\n"}, {simplePageRFC3339Date, templateDate, "2013-05-17 16:59:30 +0000 UTC"}, } @@ -593,14 +593,14 @@ func TestSkipRender(t *testing.T) { doc string expected string }{ - {filepath.FromSlash("sect/doc1.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc1.html"), "\n\nsome content
\n"}, {filepath.FromSlash("sect/doc2.html"), "more content"}, - {filepath.FromSlash("sect/doc3.html"), "\n\nsome content
\n"}, - {filepath.FromSlash("sect/doc4.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc3.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc4.html"), "\n\nsome content
\n"}, {filepath.FromSlash("sect/doc5.html"), "body5"}, {filepath.FromSlash("sect/doc6.html"), "body5"}, {filepath.FromSlash("doc7.html"), "doc7 content"}, - {filepath.FromSlash("sect/doc8.html"), "\n\nsome content
\n"}, + {filepath.FromSlash("sect/doc8.html"), "\n\nsome content
\n"}, } for _, test := range tests {