Tests: Add unit tests for pkg/clean

This commit is contained in:
graciousgrey
2023-06-26 15:57:56 +02:00
parent 186d1f26e7
commit 1e55e5b1d9
10 changed files with 78 additions and 0 deletions

View File

@@ -62,4 +62,14 @@ func TestState(t *testing.T) {
assert.Equal(t, "", result)
})
t.Run("Control Character", func(t *testing.T) {
result := State("Washington"+string(rune(127)), "us")
assert.Equal(t, "Washington", result)
})
t.Run("Special Chars", func(t *testing.T) {
result := State("Wa?shing*ton"+string(rune(127)), "us")
assert.Equal(t, "Washington", result)
})
}