Download this file
| 1 | // Code generated by rastrillo generate; DO NOT EDIT. |
| 2 | |
| 3 | package locales |
| 4 | |
| 5 | import ( |
| 6 | "os" |
| 7 | "slices" |
| 8 | "testing" |
| 9 | |
| 10 | "amadan.net/rastrillo/rastrillo/budget" |
| 11 | "amadan.net/rastrillo/rastrillo/locales" |
| 12 | ) |
| 13 | |
| 14 | func TestMain(m *testing.M) { os.Exit(budget.Main(m)) } |
| 15 | |
| 16 | // The packs this package imports are exactly the ones its offered |
| 17 | // locales need. generate --check proves this file matches |
| 18 | // manifest/app.toml; the RASTRILLO_CHECK_CONFIG probe proves main links |
| 19 | // this package. |
| 20 | func TestPacksMatchOfferedLocales(t *testing.T) { |
| 21 | want, err := locales.PacksFor(append([]string{DefaultLocale}, offered...)) |
| 22 | if err != nil { |
| 23 | t.Fatal(err) |
| 24 | } |
| 25 | if got := locales.LinkedPacks(); !slices.Equal(got, want) { |
| 26 | t.Errorf("gen/locales links %v, manifest/app.toml needs %v: run rastrillo generate", got, want) |
| 27 | } |
| 28 | } |
| 29 | |