oficina / slides Public

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

Plain git — no account needed to clone.

Download

Download this file

1package slides
2
3import (
4 "testing"
5
6 "amadan.net/oficina/slides/internal/slides/deck"
7)
8
9// The library's CSS names are aliases the document takes and layout
10// draws (final review, I5): one pattern, deck.FontCSSName. "_Brand"
11// was a library name layout would not draw.
12func TestTheLibraryNamesFamiliesAsTheDocumentTakesThem(t *testing.T) {
13 for family, want := range map[string]string{
14 "_Brand": "Brand",
15 "--Brand--": "Brand--",
16 "...": "Uploaded font 3",
17 "Café Noir": "Caf Noir",
18 " Fira X ": "Fira X",
19 } {
20 got := cssFamilyName(family, 3)
21 if got != want || !deck.FontCSSName(got) {
22 t.Errorf("cssFamilyName(%q) = %q (document takes it: %v), want %q", family, got, deck.FontCSSName(got), want)
23 }
24 }
25}
26