aboutsummaryrefslogtreecommitdiff
path: root/internal/game/content_refs_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 20:03:13 -0400
committerhistoria <[not public]>2026-09-18 20:03:13 -0400
commit79764732406d6484f67d3dec045483dcb5d08c28 (patch)
tree7a64e8581a540b97ed554f5723e2d587424ab1c6 /internal/game/content_refs_test.go
parentf1e461ab6aec6b9bf056bbe2daa88a251e0f21da (diff)
downloadthehouseoficarus-79764732406d6484f67d3dec045483dcb5d08c28.tar.gz
feat: better card ascii art
Diffstat (limited to 'internal/game/content_refs_test.go')
-rw-r--r--internal/game/content_refs_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/game/content_refs_test.go b/internal/game/content_refs_test.go
new file mode 100644
index 0000000..456a0ee
--- /dev/null
+++ b/internal/game/content_refs_test.go
@@ -0,0 +1,21 @@
+package game
+
+import (
+ "path/filepath"
+ "testing"
+
+ "thehouseoficarus/internal/world"
+)
+
+// TestCodeReferencedRoomsExist guards the literal room IDs in content_refs.go.
+// If one of those rooms is moved or deleted, the thief-jail and
+// estate-directory teleports would silently soft-lock players, so the shipped
+// data must still contain them.
+func TestCodeReferencedRoomsExist(t *testing.T) {
+ w := world.New(filepath.Join("..", "..", "data"))
+ for _, id := range []int{jailRoomID, estateNeighborhoodID} {
+ if _, err := w.LoadRoom(id); err != nil {
+ t.Errorf("code-referenced room %d is missing from data/rooms: %v", id, err)
+ }
+ }
+}