diff options
| author | historia <[not public]> | 2026-07-09 05:27:10 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-09 05:27:10 -0400 |
| commit | c705ae942573984784ef501bf8198f61f5206ddd (patch) | |
| tree | c964066f3a244002bf75cb50a877630f46496f81 /internal/validate/local_test.go | |
| parent | 74153c7814fc4cef988066ef04e38731a943bc12 (diff) | |
| download | thehouseoficarus-c705ae942573984784ef501bf8198f61f5206ddd.tar.gz | |
refactor: simplify yaml, remove support for old scalar fields
Diffstat (limited to 'internal/validate/local_test.go')
| -rw-r--r-- | internal/validate/local_test.go | 24 |
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 { |
