/
githubmirror
/
hugo
Обзор
Документация
Войти
/
githubmirror
/
hugo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
output/outputFormat_integration_test.go
30 строк
557 B
Bjørn Erik Pedersen
output: Add TestCanonical integration test
16 янв 2026, 21:08
16 янв 2026, 21:08
2bc54df
Код
Авторство
О чём код?
package output_test import ( "testing" "github.com/gohugoio/hugo/hugolib" ) func TestCanonical(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- [outputs] home = ["notcanonical", "html", "rss"] [outputFormats] [outputFormats.notcanonical] mediaType = 'text/html' path = 'not' isHTML = true -- layouts/all.html -- All. Canonical: {{ .OutputFormats.Canonical.RelPermalink }}. ` b := hugolib.Test(t, files) b.AssertFileContent("public/not/index.html", "All. Canonical: /.") b.AssertFileContent("public/index.html", "All. Canonical: /.") }