From 68ba3955fd4691c528f9a9ef7e09a3084fc7a4cf Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 25 Jan 2026 13:49:10 +0200 Subject: [PATCH] Lua tests: more code coverage for rooms --- test/test_des.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/test_des.lua b/test/test_des.lua index 4477c620c..ee2899026 100644 --- a/test/test_des.lua +++ b/test/test_des.lua @@ -394,15 +394,24 @@ function test_room() des.room({ x=4, y=3, w=3,h=3 }); end }); - des.room({ type="ordinary", coord={3, 3}, w=3, h=3 }); - des.room(); + des.room({ xalign="right", yalign="bottom", + contents = function(rm) + des.room({ contents = function(rm) + des.door({ state= "random", wall = "random" }); + end }); + end + }); des.room({ contents = function(rm) des.object(); des.monster(); + des.trap(); des.terrain(0,0, "L"); + des.altar({ coord = {0,0} }); des.terrain(rm.width, rm.height, "T"); end }); + des.room({ type="ordinary", coord={3, 3}, w=3, h=3 }); + des.room(); des.random_corridors(); end