From c705ae942573984784ef501bf8198f61f5206ddd Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 9 Jul 2026 05:27:10 -0400 Subject: refactor: simplify yaml, remove support for old scalar fields --- internal/validate/local_test.go | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'internal/validate/local_test.go') 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 { -- cgit v1.2.3