diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 15:17:37 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-05-21 15:17:37 +0300 |
| commit | 06bcd06a17be3bd242e2b8230dd9b803b1969f3c (patch) | |
| tree | ecec609d7cccd346a81d749c63b094ce3a97a11f /tests/server_headless.rs | |
| parent | dde0ddb3aec0522f2bc4c6fa1cb7d25f99fc8403 (diff) | |
feat: use local keybindings for remote attach
Diffstat (limited to 'tests/server_headless.rs')
| -rw-r--r-- | tests/server_headless.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/server_headless.rs b/tests/server_headless.rs index 8f0234f0..93531324 100644 --- a/tests/server_headless.rs +++ b/tests/server_headless.rs @@ -179,6 +179,7 @@ fn client_handshake( &encode_varint_u32(8), // cell_width_px &encode_varint_u32(16), // cell_height_px &encode_varint_u32(0), // RenderEncoding::SemanticFrame + &encode_varint_u32(0), // ClientKeybindings::Server ], ); let framed = frame_message(&hello_payload); @@ -591,11 +592,11 @@ fn client_handshake_succeeds() { // Connect to the client socket and perform a handshake. let mut stream = UnixStream::connect(&client_socket).expect("should connect to client socket"); - // Send Hello with version 8, 80 cols, 24 rows. + // Send Hello with the current protocol version, 80 cols, 24 rows. let (version, error) = - client_handshake(&mut stream, 8, 80, 24).expect("handshake should succeed"); + client_handshake(&mut stream, 9, 80, 24).expect("handshake should succeed"); - assert_eq!(version, 8, "server should report protocol version 8"); + assert_eq!(version, 9, "server should report protocol version 9"); assert!( error.is_none(), "handshake should not have an error: {:?}", @@ -624,7 +625,7 @@ fn client_handshake_rejects_incompatible_version() { let (version, error) = client_handshake(&mut stream, 0, 80, 24) .expect("should read Welcome response even on rejection"); - assert_eq!(version, 8, "server should report its version 8"); + assert_eq!(version, 9, "server should report its version 9"); assert!( error.is_some(), "version 0 should be rejected with an error" @@ -649,10 +650,10 @@ fn client_handshake_clamps_small_terminal_size() { // Send Hello with 0x0 terminal size — should be clamped. let mut stream = UnixStream::connect(&client_socket).expect("should connect to client socket"); - let (version, error) = client_handshake(&mut stream, 8, 0, 0) + let (version, error) = client_handshake(&mut stream, 9, 0, 0) .expect("handshake with 0x0 should succeed (server clamps)"); - assert_eq!(version, 8); + assert_eq!(version, 9); assert!( error.is_none(), "0x0 size should be accepted (clamped): {:?}", @@ -712,9 +713,9 @@ fn no_hello_client_closed_within_five_seconds() { // Verify the server is still healthy — a proper client can still connect. let mut good_stream = UnixStream::connect(&client_socket).expect("should connect after no-hello client"); - let (version, error) = client_handshake(&mut good_stream, 8, 80, 24) + let (version, error) = client_handshake(&mut good_stream, 9, 80, 24) .expect("proper handshake should still work after no-hello client"); - assert_eq!(version, 8); + assert_eq!(version, 9); assert!(error.is_none()); // API should still work. |
