diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-01 10:42:56 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-01 10:42:56 +0300 |
| commit | 999f4198cb97778bd0d52fd0106481c4fb9e525c (patch) | |
| tree | cb15b5dcb0379eb7f85b7934da1ff427716cdc03 /integrationtests | |
| parent | 36d1f8e17bc1146ed52f6a8bf319b6c06a3be0f5 (diff) | |
Add retro VT323 webfont for task 1b
Diffstat (limited to 'integrationtests')
| -rw-r--r-- | integrationtests/integration_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/integrationtests/integration_test.go b/integrationtests/integration_test.go index 93b3b4e..526816d 100644 --- a/integrationtests/integration_test.go +++ b/integrationtests/integration_test.go @@ -457,24 +457,24 @@ func TestThemeSelection(t *testing.T) { t.Fatalf("theme asset %s is empty", path) } } - if theme == "matrix" { - matrixDir := filepath.Join(outputDir, "themes", "matrix") + if theme == "matrix" || theme == "retro" { + themeDir := filepath.Join(outputDir, "themes", theme) for _, fname := range []string{"VT323-Regular.woff2", "FONT_LICENSE.txt"} { - path := filepath.Join(matrixDir, fname) + path := filepath.Join(themeDir, fname) info, err := os.Stat(path) if err != nil { - t.Fatalf("matrix extra asset missing %s: %v", path, err) + t.Fatalf("%s extra asset missing %s: %v", theme, path, err) } if info.Size() == 0 { - t.Fatalf("matrix extra asset %s is empty", path) + t.Fatalf("%s extra asset %s is empty", theme, path) } } - matrixCSS := readFile(t, filepath.Join(matrixDir, "theme.css")) - assertContains(t, matrixCSS, "url('VT323-Regular.woff2')", "matrix local font URL") + themeCSS := readFile(t, filepath.Join(themeDir, "theme.css")) + assertContains(t, themeCSS, "url('VT323-Regular.woff2')", theme+" 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) + if strings.Contains(themeCSS, forbidden) { + t.Fatalf("%s theme.css contains runtime third-party font reference %q", theme, forbidden) } } } |
