From 0e60567a7a0addb9421769ee7be7853bfa8788cb Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Sat, 19 Sep 2026 03:15:59 -0400 Subject: refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code --- internal/player/skill_abbr_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/player/skill_abbr_test.go (limited to 'internal/player/skill_abbr_test.go') diff --git a/internal/player/skill_abbr_test.go b/internal/player/skill_abbr_test.go new file mode 100644 index 0000000..81039f0 --- /dev/null +++ b/internal/player/skill_abbr_test.go @@ -0,0 +1,19 @@ +package player + +import "testing" + +// Every skill must have an abbreviation. A missing entry silently renders as an +// empty XP drop and an empty column in the skills display, with no error, so +// this must fail loudly when a skill is added without its abbreviation. +func TestEverySkillHasAbbreviation(t *testing.T) { + for _, skill := range AllSkills { + if SkillAbbr[skill] == "" { + t.Errorf("skill %q has no abbreviation", skill) + } + } + for skill := range SkillAbbr { + if !ValidSkill(skill) { + t.Errorf("SkillAbbr contains unknown skill %q", skill) + } + } +} -- cgit v1.2.3