aboutsummaryrefslogtreecommitdiffstats
path: root/internal/slug/slug_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/slug/slug_test.go')
-rw-r--r--internal/slug/slug_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/slug/slug_test.go b/internal/slug/slug_test.go
index 9953f34..59e2a75 100644
--- a/internal/slug/slug_test.go
+++ b/internal/slug/slug_test.go
@@ -20,6 +20,15 @@ func TestMake(t *testing.T) {
}
}
+func TestClean(t *testing.T) {
+ cases := map[string]string{"!!!": "", "": "", "Ντομάτες": "ntomates", "Go ": "go"}
+ for in, want := range cases {
+ if got := Clean(in); got != want {
+ t.Errorf("Clean(%q) = %q, want %q", in, got, want)
+ }
+ }
+}
+
func TestValid(t *testing.T) {
for _, ok := range []string{"a", "abc-def", "a1-b2"} {
if !Valid(ok) {