diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-01 10:31:40 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-01 10:31:40 +0300 |
| commit | 64ea6091374753ec5424b5883aa0a189fa54831e (patch) | |
| tree | 1fc9e9d960608291156ee18decba42006e3cfb94 /integrationtests/integration_test.go | |
| parent | f4090989293ee11735d8ca20edd4e3308d87e24f (diff) | |
Add self-hosted VT323 matrix font for task 0b
Diffstat (limited to 'integrationtests/integration_test.go')
| -rw-r--r-- | integrationtests/integration_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/integrationtests/integration_test.go b/integrationtests/integration_test.go index 44913c5..93b3b4e 100644 --- a/integrationtests/integration_test.go +++ b/integrationtests/integration_test.go @@ -457,6 +457,27 @@ func TestThemeSelection(t *testing.T) { t.Fatalf("theme asset %s is empty", path) } } + if theme == "matrix" { + matrixDir := filepath.Join(outputDir, "themes", "matrix") + for _, fname := range []string{"VT323-Regular.woff2", "FONT_LICENSE.txt"} { + path := filepath.Join(matrixDir, fname) + info, err := os.Stat(path) + if err != nil { + t.Fatalf("matrix extra asset missing %s: %v", path, err) + } + if info.Size() == 0 { + t.Fatalf("matrix extra asset %s is empty", path) + } + } + + matrixCSS := readFile(t, filepath.Join(matrixDir, "theme.css")) + assertContains(t, matrixCSS, "url('VT323-Regular.woff2')", "matrix local font URL") + for _, forbidden := range []string{"googleapis", "gstatic", "fonts.cdn", "@import url(http"} { + if strings.Contains(matrixCSS, forbidden) { + t.Fatalf("matrix theme.css contains runtime third-party font reference %q", forbidden) + } + } + } // sounds.json must include ambient data. soundsPath := filepath.Join(outputDir, "themes", theme, "sounds.json") |
