From 8484406c67e5ebbfb332b0c4441885c7c93d15f2 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 3 Oct 2024 13:49:04 +0100 Subject: [PATCH] chore: Add test case for filtering the new word in input strings. --- goaway_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/goaway_test.go b/goaway_test.go index 5d4c0eb..210cd8a 100644 --- a/goaway_test.go +++ b/goaway_test.go @@ -150,6 +150,11 @@ func TestProfanityDetector_Censor(t *testing.T) { expectedOutput: "document **** document ****", expectedOutputWithoutSpaceSanitization: "document **** document ****", }, + { + input: "Everyone was staring, and someone muttered ‘gyat’ under their breath.", + expectedOutput: "Everyone was staring, and someone muttered ‘****’ under their breath.", + expectedOutputWithoutSpaceSanitization: "Everyone was staring, and someone muttered ‘****’ under their breath.", + }, } for _, tt := range tests { t.Run("default_"+tt.input, func(t *testing.T) {