osc: add failing test for osc 133 parsing trailing ;

This actually causes a crash lol, bad indexing of a slice with `1..0`
because it's `key.len + 1 ..` and the length is `0`.
This commit is contained in:
Qwerasd
2026-01-16 16:26:54 -05:00
parent c8295815cb
commit f89b6433c2

View File

@@ -348,6 +348,18 @@ test "OSC 133: prompt_start with special_key empty" {
try testing.expect(cmd.prompt_start.special_key == false);
}
test "OSC 133: prompt_start with trailing ;" {
const testing = std.testing;
var p: Parser = .init(null);
const input = "133;A;";
for (input) |ch| p.next(ch);
const cmd = p.end(null).?.*;
try testing.expect(cmd == .prompt_start);
}
test "OSC 133: prompt_start with click_events true" {
const testing = std.testing;