package slidestest import ( "bytes" "os" "path/filepath" "testing" "amadan.net/oficina/estilo.git/theme" ) // The layout names Onest's stylesheet by a literal path; this keeps that // literal equal to estilo's versioned prefix, so an estilo font move // fails here rather than every page quietly falling back to the system // face. func TestLayoutLinksEstilosFonts(t *testing.T) { layout, err := os.ReadFile(filepath.Join("..", "slides", "templates", "layout.html")) if err != nil { t.Fatal(err) } if want := `href="` + theme.FontPrefix + `fonts.css"`; !bytes.Contains(layout, []byte(want)) { t.Errorf("layout.html does not link %s", want) } }