aboutsummaryrefslogtreecommitdiff
path: root/internal/player/skill_abbr_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-19 03:15:59 -0400
committerhistoria <[not public]>2026-09-19 03:15:59 -0400
commit0e60567a7a0addb9421769ee7be7853bfa8788cb (patch)
tree7645112db0e4eae95b8a83c1e4f9aab38bede655 /internal/player/skill_abbr_test.go
parentcc33072eced3d5460512c09c42ec4531c807d7af (diff)
downloadthehouseoficarus-0e60567a7a0addb9421769ee7be7853bfa8788cb.tar.gz
refactor: simplifcation, change how rooms are stored in player yaml, remove legacy code
Diffstat (limited to 'internal/player/skill_abbr_test.go')
-rw-r--r--internal/player/skill_abbr_test.go19
1 files changed, 19 insertions, 0 deletions
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)
+ }
+ }
+}