The README says what 8bitMyGoUI is, in English with a Chinese summary, and shows the gallery home in Winter Night. It covers install, a first window, the eight palettes, the dot, locale and Reduce Motion, the gallery and web commands, the showcase URL and the 500 components by category. The example was compiled and clicked headlessly in its own module; a gallery test keeps the counts true to the registry. THIRD_PARTY_NOTICES.md lists what the native gallery and the showcase link, from go list -deps, each license copied verbatim: MyGo, Ark Pixel Font, rsc.io/qr, go-text/typesetting, golang.org/x/image, purego and Go itself. AGENTS.md records the gallery sweeps, the console-error rule, the budget test and what follows a third failed review.
30 lines
750 B
Go
30 lines
750 B
Go
package gallery
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestReadmeCountsMatchTheRegistry(t *testing.T) {
|
|
b, err := os.ReadFile("../README.md")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
readme, total := string(b), 0
|
|
for _, cat := range Categories[1:] {
|
|
n := count(cat.Key)
|
|
total += n
|
|
if row := fmt.Sprintf("| %s | %s | %d |", cat.Name, cat.Zh, n); !strings.Contains(readme, row) {
|
|
t.Errorf("README lacks %q", row)
|
|
}
|
|
}
|
|
if all := fmt.Sprintf("| **All** | **全部** | **%d** |", total); !strings.Contains(readme, all) {
|
|
t.Errorf("README lacks %q", all)
|
|
}
|
|
if n := count("foundations"); n != 8 || !strings.Contains(readme, "Eight foundation pages") {
|
|
t.Errorf("README says eight foundation pages; the registry has %d", n)
|
|
}
|
|
}
|