From d4e3c675c597a5240ba864903db338b5e3e45cd2 Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Mon, 18 May 2020 11:12:40 +0200 Subject: [PATCH] Backend: Add test cases to TestWords --- pkg/txt/words_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/txt/words_test.go b/pkg/txt/words_test.go index 0d736d7a8..99e402550 100644 --- a/pkg/txt/words_test.go +++ b/pkg/txt/words_test.go @@ -15,6 +15,18 @@ func TestWords(t *testing.T) { result := Words("x") assert.Equal(t, []string(nil), result) }) + t.Run("Österreich Urlaub", func(t *testing.T) { + result := Words("Österreich Urlaub") + assert.Equal(t, []string{"Österreich", "Urlaub"}, result) + }) + t.Run("Schäferhund", func(t *testing.T) { + result := Words("Schäferhund") + assert.Equal(t, []string{"Schäferhund"}, result) + }) + t.Run("Île de la Réunion", func(t *testing.T) { + result := Words("Île de la Réunion") + assert.Equal(t, []string{"Île", "Réunion"}, result) + }) } func TestReplaceSpaces(t *testing.T) {