ci-platforms / darwin arm64 smoke (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin amd64 smoke (push) Skipped
github-native / gitea-pending (push) Skipped
github-native / darwin amd64 native (push) Skipped
github-native / linux amd64 native (push) Skipped
github-native / windows amd64 native (push) Skipped
github-native / darwin arm64 native (push) Skipped
github-native / gitea-result (push) Skipped
ci / checks (push) Failing after 7m29s
ci / build (amd64, linux, ubuntu-24.04) (push) Failing after 14m13s
ci / release (push) Skipped
GitHub / windows amd64 native GitHub-hosted native CI: failure
GitHub / darwin arm64 native GitHub-hosted native CI: error
GitHub / darwin amd64 native GitHub-hosted native CI: failure
GitHub / linux amd64 native GitHub-hosted native CI: success
Keep recovery copies private on Windows, make cross-platform test fixtures deterministic, and preserve the updated Art and documentation contracts. Refresh workspace screenshot references for the intentional factory layouts and restore the earlier Russian palette reference after before/after comparison. Keep the existing screenshot tolerances.
33 lines
1010 B
Go
33 lines
1010 B
Go
package site
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestFooterAuthorNoticeOnEveryPage(t *testing.T) {
|
|
_, _, pages := build(t, fixture(), Options{
|
|
Version: "0.12.5-dev", Repo: "https://git.example/aego", Commit: "abc1234",
|
|
Time: time.Date(2030, time.February, 1, 0, 0, 0, 0, time.UTC),
|
|
})
|
|
for name, page := range pages {
|
|
t.Run(name, func(t *testing.T) {
|
|
_, footer, ok := strings.Cut(page, `<footer class="foot">`)
|
|
if !ok {
|
|
t.Fatal("page has no documentation footer")
|
|
}
|
|
footer, _, ok = strings.Cut(footer, "</footer>")
|
|
const notice = `Copyleft 2026 <a href="https://about.akarpov.ru/">akarpov</a>`
|
|
if !ok || strings.Count(footer, notice) != 1 {
|
|
t.Fatal("footer must contain exactly one fixed-year author notice and profile link")
|
|
}
|
|
for _, want := range []string{"Aego 0.12.5-dev", "abc1234", "2030-02-01", "llms.txt"} {
|
|
if !strings.Contains(footer, want) {
|
|
t.Errorf("author notice displaced existing footer metadata/link %q", want)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
}
|