Files
any2anexoj/internal/writing/localizer_test.go
natercio 47f38fce2b
Badges / coveralls (push) Successful in 1m1s
Implement HTML writer (#33)
Reviewed-on: #33
Co-authored-by: Natercio Moniz <[email protected]>
2026-10-05 16:25:21 +01:00

29 lines
558 B
Go

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)
}
})
}
}