aboutsummaryrefslogtreecommitdiff
path: root/internal/validate/local_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/validate/local_test.go')
-rw-r--r--internal/validate/local_test.go24
1 files changed, 16 insertions, 8 deletions
diff --git a/internal/validate/local_test.go b/internal/validate/local_test.go
index 337f3d2..f0bc0a1 100644
--- a/internal/validate/local_test.go
+++ b/internal/validate/local_test.go
@@ -78,9 +78,11 @@ func TestValidateRoomsSameNameCollision(t *testing.T) {
objects:
- id: ghost_object
- name: sign
- description: "one"
+ description:
+ - text: "one"
- name: sign
- description: "two"
+ description:
+ - text: "two"
`)
issues := validateRooms(newSource(dir))
@@ -102,7 +104,8 @@ objects:
- id: copper_rock
- id: anvil
- name: anvil
- description: "a local thing that collides with the file id"
+ description:
+ - text: "a local thing that collides with the file id"
`)
issues := validateRooms(newSource(dir))
@@ -136,11 +139,13 @@ func TestValidateExitReciprocityMismatch(t *testing.T) {
dir := t.TempDir()
writeFile(t, filepath.Join(dir, "rooms", "1.yaml"), `name: Room One
exits:
- down: 2
+ down:
+ room: 2
`)
writeFile(t, filepath.Join(dir, "rooms", "2.yaml"), `name: Room Two
exits:
- south: 1
+ south:
+ room: 1
`)
issues := validateExitReciprocity(newSource(dir))
if !containsMsg(issues, "not the expected opposite direction") {
@@ -152,7 +157,8 @@ func TestValidateExitReciprocityOneWay(t *testing.T) {
dir := t.TempDir()
writeFile(t, filepath.Join(dir, "rooms", "1.yaml"), `name: Room One
exits:
- east: 2
+ east:
+ room: 2
`)
writeFile(t, filepath.Join(dir, "rooms", "2.yaml"), `name: Room Two
`)
@@ -167,9 +173,11 @@ func TestValidateRoomsPartialNameSiblingsOK(t *testing.T) {
writeFile(t, filepath.Join(dir, "rooms", "1.yaml"), `name: Test Room
objects:
- name: rusty sign
- description: "rusty"
+ description:
+ - text: "rusty"
- name: shiny sign
- description: "shiny"
+ description:
+ - text: "shiny"
`)
issues := validateRooms(newSource(dir))
for _, iss := range issues {