oficina / slides Public

Clone
git clone https://amadan.net/oficina/slides

Plain git — no account needed to clone.

Download

Download this file

1package slidestest
2
3import (
4 "bytes"
5 "os"
6 "path/filepath"
7 "testing"
8
9 "amadan.net/oficina/estilo.git/theme"
10)
11
12// The layout names Onest's stylesheet by a literal path; this keeps that
13// literal equal to estilo's versioned prefix, so an estilo font move
14// fails here rather than every page quietly falling back to the system
15// face.
16func TestLayoutLinksEstilosFonts(t *testing.T) {
17 layout, err := os.ReadFile(filepath.Join("..", "slides", "templates", "layout.html"))
18 if err != nil {
19 t.Fatal(err)
20 }
21 if want := `href="` + theme.FontPrefix + `fonts.css"`; !bytes.Contains(layout, []byte(want)) {
22 t.Errorf("layout.html does not link %s", want)
23 }
24}
25