summaryrefslogtreecommitdiffstats
path: root/resources/page/path_integration_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'resources/page/path_integration_test.go')
-rw-r--r--resources/page/path_integration_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/resources/page/path_integration_test.go b/resources/page/path_integration_test.go
index 961cfb33f..3bd8ccf1f 100644
--- a/resources/page/path_integration_test.go
+++ b/resources/page/path_integration_test.go
@@ -55,10 +55,11 @@ title: p#2
b.AssertFileContentExact("public/index.html", "/|/s1/p%231/|/s2/p%232/|/tags/test%23tag%23/|")
}
-func TestOutputFormatWithPathIssue13829(t *testing.T) {
+// Issues: 13829, 4428, 7497.
+func TestMiscPathIssues(t *testing.T) {
t.Parallel()
- files := `
+ filesTemplate := `
-- hugo.toml --
uglyURLs = false
@@ -115,9 +116,11 @@ title: red
const code string = "TITLE: {{ .Title }} | AOFRP: {{ range .AlternativeOutputFormats }}{{ .RelPermalink }}{{ end }} | TEMPLATE: {{ templates.Current.Name }}"
for _, template := range templates {
- files += "-- " + template + " --\n" + code + "\n"
+ filesTemplate += "-- " + template + " --\n" + code + "\n"
}
+ files := filesTemplate
+
b := hugolib.Test(t, files)
// uglyURLs: false, outputFormat: html
@@ -134,14 +137,11 @@ title: red
b.AssertFileContent("public/print/tags/index.txt", "TITLE: tags | AOFRP: /tags/ | TEMPLATE: taxonomy.print.txt")
b.AssertFileContent("public/print/tags/red/index.txt", "TITLE: red | AOFRP: /tags/red/ | TEMPLATE: term.print.txt")
- files = strings.ReplaceAll(files, "uglyURLs = false", "uglyURLs = true")
+ files = strings.ReplaceAll(filesTemplate, "uglyURLs = false", "uglyURLs = true")
b = hugolib.Test(t, files)
- // The assertions below assume that https://github.com/gohugoio/hugo/issues/4428
- // and https://github.com/gohugoio/hugo/issues/7497 have been fixed.
-
// uglyURLs: true, outputFormat: html
- /*b.AssertFileContent("public/index.html", "TITLE: home | AOFRP: /print/index.txt | TEMPLATE: home.html")
+ b.AssertFileContent("public/index.html", "TITLE: home | AOFRP: /print/index.txt | TEMPLATE: home.html")
b.AssertFileContent("public/s1/index.html", "TITLE: s1 | AOFRP: /print/s1/index.txt | TEMPLATE: section.html")
b.AssertFileContent("public/s1/p1.html", "TITLE: p1 | AOFRP: /print/s1/p1.txt | TEMPLATE: page.html")
b.AssertFileContent("public/tags/index.html", "TITLE: tags | AOFRP: /print/tags/index.txt | TEMPLATE: taxonomy.html")
@@ -152,5 +152,5 @@ title: red
b.AssertFileContent("public/print/s1/index.txt", "TITLE: s1 | AOFRP: /s1/index.html | TEMPLATE: section.print.txt")
b.AssertFileContent("public/print/s1/p1.txt", "TITLE: p1 | AOFRP: /s1/p1.html | TEMPLATE: page.print.txt")
b.AssertFileContent("public/print/tags/index.txt", "TITLE: tags | AOFRP: /tags/index.html | TEMPLATE: taxonomy.print.txt")
- b.AssertFileContent("public/print/tags/red.txt", "TITLE: red | AOFRP: /tags/red.html | TEMPLATE: term.print.txt")*/
+ b.AssertFileContent("public/print/tags/red.txt", "TITLE: red | AOFRP: /tags/red.html | TEMPLATE: term.print.txt")
}