mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-15 07:41:21 +02:00
test(nx-mods): lock zip and chord edge regressions
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -114,6 +114,25 @@ Game:gamepadpressed(joySelectDown, "y")
|
||||
eq(digits[1], "5", "Select via isGamepadDown(back) + Y -> 5")
|
||||
eq(#padForwarded, 0, "isGamepadDown Select chord does not forward face")
|
||||
|
||||
-- Edge: every chord face without Select must not cycle (NXMOD-09)
|
||||
GamepadMap._setForceNXForTests(false)
|
||||
for _, btn in ipairs({ "a", "b", "y", "x", "leftshoulder" }) do
|
||||
Input:init()
|
||||
resetSpies()
|
||||
Game:gamepadpressed(joy, btn)
|
||||
eq(#digits, 0, "edge: no cycle without Select for " .. btn)
|
||||
eq(#padForwarded, 1, "edge: " .. btn .. " still reaches Input without Select")
|
||||
check(not wroteOptions, "edge: no options write without Select for " .. btn)
|
||||
end
|
||||
|
||||
-- Edge: Select alone (no face) does not synthesize a digit
|
||||
holdSelect()
|
||||
resetSpies()
|
||||
-- pressing back again while held is not a display chord partner
|
||||
Game:gamepadpressed(joy, "back")
|
||||
eq(#digits, 0, "edge: Select alone does not fire a display digit")
|
||||
eq(#padForwarded, 1, "edge: Select alone still forwards to Input")
|
||||
|
||||
GamepadMap._setForceNXForTests(false)
|
||||
Game.keypressed = origKeypressed
|
||||
Input.gamepadpressed = origPad
|
||||
|
||||
@@ -40,4 +40,10 @@ eq(GamepadMap.displayChordDigit("x"), "6", "NX X -> key 6")
|
||||
eq(GamepadMap.displayChordDigit("leftshoulder"), "7", "NX L -> key 7")
|
||||
GamepadMap._setForceNXForTests(false)
|
||||
|
||||
-- Edge: map alone never invents a digit for non-chord faces (NXMOD-09 map half)
|
||||
for _, btn in ipairs({ "guide", "leftstick", "rightstick", "lefttrigger" }) do
|
||||
eq(GamepadMap.displayChordDigit(btn), nil,
|
||||
"edge: unmapped " .. btn .. " is not a display digit")
|
||||
end
|
||||
|
||||
T.finish()
|
||||
|
||||
Reference in New Issue
Block a user