summaryrefslogtreecommitdiff
path: root/test/behaviour/other_files.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-03 16:52:58 -0300
committerGabriel Schneider <[email protected]>2026-11-03 16:52:58 -0300
commitd1273bbd99daf9b1855d82bf315db8ede20abde5 (patch)
tree14891fab4f951767dcf4d2b14470703055479b90 /test/behaviour/other_files.zig
parenta0320c49c1288e8e74f18983f18988a024952bb8 (diff)
downloadpardes-d1273bbd99daf9b1855d82bf315db8ede20abde5.tar.gz
pardes-d1273bbd99daf9b1855d82bf315db8ede20abde5.zip
fs: a pane's ctl read ends with its mode (mode:normal|insert|select|tty, select being normal mode extending), and kbdin takes Plan 9's Kalt, Kshift and Kctl runes (U+F015-F017), each adding its modifier to the key after it, an Alt or Ctrl key typing no text: the two surfaces the behavioural tests' inventory found most wanted (90 tests read body.mode, 18 send Alt or Shift); the tests that pinned the ctl line's end look for its words instead
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/behaviour/other_files.zig')
-rw-r--r--test/behaviour/other_files.zig7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/behaviour/other_files.zig b/test/behaviour/other_files.zig
index b97affc4..c0f9c08f 100644
--- a/test/behaviour/other_files.zig
+++ b/test/behaviour/other_files.zig
@@ -21,3 +21,10 @@ test "other-files: kbdin types at the pane with the keyboard and mousein clicks,
try std.testing.expectEqual(@as(u16, 22), try s.refused("/kbdin", "\xff"));
try std.testing.expectError(error.Refused, s.read("/kbdin"));
}
+
+test "other-files: kbdin's Kalt rune is Alt on the key after it alone, and an Alt key types nothing" {
+ var s = try Session.initFile(std.testing.allocator, "x\n");
+ defer s.deinit();
+ try s.keys("i\u{F015}zy\x1b");
+ try s.expect(s.at("/pane/{d}/body", .{try s.focused()}), "yx\n");
+}