writers in writing package

This commit is contained in:
natercio committed 2026-09-28 21:50:26 +01:00
1 parent 4604175e8d
commit bb00676452
15 files changed
+215 -721

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
package writing_test
import (
"testing"
"github.com/nmoniz/any2anexoj/internal/writing"
)
func TestNewLocalizer(t *testing.T) {
tests := []struct {
name string
lang string
}{
{"english", "en"},
{"portuguese", "pt"},
{"english with region", "en-US"},
{"portuguese with region", "pt-BR"},
{"unknown language falls back to default", "!!"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
_, err := writing.NewLocalizer(tt.lang)
if err != nil {
t.Fatalf("want success call but failed: %v", err)
}
})
}
}