[sc3/windows] test(pad): PS2X_PAD_INPUT with CRLF line ends

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E6DnuKMFaNfUYKXNo6ap8W
This commit is contained in:
ArzarothandClaude Opus 5.5 committed 2026-11-01 17:23:07 +01:00
1 parent 9f7b18d7ea
commit b712e0bf2e
1 file changed
+7
+7
View File
@@ -90,6 +90,13 @@ void register_pad_input_tests()
t.Equals(static_cast<int>(ps2PadLiveInputButtonsAt("jump", 0.0, 0.1)), 0, "unknown words press nothing");
});
tc.Run("PS2X_PAD_INPUT reads lines ending in CRLF", [](TestCase &t)
{
const char *lines = "\r\nSTART\r\ncross";
t.Equals(static_cast<int>(ps2PadLiveInputButtonsAt(lines, 10.0, 10.1)), 0x0008, "START");
t.Equals(static_cast<int>(ps2PadLiveInputButtonsAt(lines, 10.0, 10.4)), 0x4000, "then CROSS");
});
tc.Run("scePadRead uses override state", [](TestCase &t)
{
std::vector<uint8_t> rdram(PS2_RAM_SIZE, 0);