package display

import (
	"testing"
)

func TestSlugify(t *testing.T) {
	cases := map[string]string{
		"What the verifier catches": "what-the-verifier-catches",
		"Use before definition":     "use-before-definition",
		"C++ / FFI (part 2)":        "c-ffi-part-2",
		"  spaces  everywhere  ":    "spaces-everywhere",
		"???":                       "",
	}
	for in, want := range cases {
		if got := slugify(in); got != want {
			t.Errorf("slugify(%q) = %q, want %q", in, got, want)
		}
	}
}
