words: they say the long tail tips the scales

Adds eailed critters and scaly ones. No anole was harmed (it was already
in the list), and the loris was turned away at the door for being
suspiciously tailless.

Removes a word that was misread/misinterpreted and starts a rejection
list in the test suite.

Updates #words

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2026-06-04 22:51:30 -07:00
committed by James Tucker
parent e8d169db8d
commit d0b12dac75
3 changed files with 64 additions and 2 deletions
+8
View File
@@ -4,10 +4,15 @@
package words
import (
"slices"
"strings"
"testing"
)
var nopes = []string{
"chub", "bangus", "hellbender",
}
func TestWords(t *testing.T) {
test := func(t *testing.T, words []string) {
t.Helper()
@@ -23,6 +28,9 @@ func TestWords(t *testing.T) {
if w == "" || strings.IndexFunc(w, nonASCIILower) != -1 {
t.Errorf("malformed word %q", w)
}
if slices.Contains(nopes, w) {
t.Errorf("word %q has been previously rejected/removed and should not be added", w)
}
}
}
t.Run("tails", func(t *testing.T) { test(t, Tails()) })