]> granicus.if.org Git - nethack/commitdiff
More movement tests
authorPasi Kallinen <paxed@alt.org>
Fri, 30 Jul 2021 15:40:57 +0000 (18:40 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 30 Jul 2021 15:40:57 +0000 (18:40 +0300)
test/testmove.lua

index 9b6b218c895c04f21d644e6b479e216fff1f4352..ba1896c30577e377c2eb6d6bf35ee41ffe2d5d8a 100644 (file)
@@ -31,6 +31,10 @@ function setup1(param)
    des.terrain(POS.x - 2, POS.y, param);
 end
 
+function setup2(param)
+   des.terrain(POS.x + 15, POS.y, param);
+end
+
 local basicmoves = {
    -- move
    h = { dx = -1,  dy =  0, number_pad = 0 },
@@ -89,6 +93,16 @@ local basicmoves = {
    { key = "h", dx =  0, dy = 0, number_pad = 0, setup = setup1, param = "F" },
    { key = "h", dx = -1, dy = 0, number_pad = 0, setup = setup1, param = "#" },
    { key = "h", dx = -1, dy = 0, number_pad = 0, setup = setup1, param = "." },
+
+   -- run and terrains
+   { key = "L", x = POS.x + 15, y = POS.y, number_pad = 0, setup = setup2, param = " " },
+   { key = "L", x = POS.x + 15, y = POS.y, number_pad = 0, setup = setup2, param = "|" },
+   { key = "L", x = POS.x + 15, y = POS.y, number_pad = 0, setup = setup2, param = "-" },
+   { key = "L", x = POS.x + 15, y = POS.y, number_pad = 0, setup = setup2, param = "F" },
+   { key = "L", x = POS.x + 15, y = POS.y, number_pad = 0, setup = setup2, param = "L" },
+   { key = "L", x = nhc.COLNO - 2, y = POS.y, number_pad = 0, setup = setup2, param = "#" },
+   { key = "L", x = nhc.COLNO - 2, y = POS.y, number_pad = 0, setup = setup2, param = "C" },
+
 };