mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 19:45:49 +00:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user