From 7bb24a89e53bee4b14522c0e590995d87f6c09ad Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 30 Dec 2025 22:08:22 +0100 Subject: Add testing for html tags --- ki18n/ki18n_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ki18n') diff --git a/ki18n/ki18n_test.go b/ki18n/ki18n_test.go index b9ad997..deb8f30 100644 --- a/ki18n/ki18n_test.go +++ b/ki18n/ki18n_test.go @@ -30,6 +30,15 @@ func TestVariables(t *testing.T) { assert.Equal(t, "Bonjour John", result) } +func TestSpanClass(t *testing.T) { + initFrenchLocale(map[string]string{ + "Hello %s": "Bonjour %s", + }) + + result := render(t, Tr("fr-FR", "Hello %s", "John")) + assert.Equal(t, "Bonjour John", result) +} + // render is a test helper that renders a component and returns the result as a string func render(t *testing.T, c templ.Component) string { t.Helper() -- cgit v1.3