summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-21 14:35:15 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commitbc3d18d27f9fc1155db7fac3946c4d38774f9e65 (patch)
tree9178ce95952797f8a78b16c2b805e53368efb35a /src/ninep/events.zig
parent1ecb9b720840ea8e4753823fa8cddcf5d6a3a4d2 (diff)
downloadpardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.tar.gz
pardes-bc3d18d27f9fc1155db7fac3946c4d38774f9e65.zip
Build with Zig 0.17
ghostty, libvaxis and uucode move to ghostty's 0.17 pins, cloud9 to its 0.17 main, SDL to castholm's release-3.4.x (3.4.18), zstbi and tree-sitter to forks with 0.17 build files (see build.zig.zon). A bare zig build copies the binaries into ~/.local/bin (-Dhome-install=false leaves it out): 0.17 keeps the prefix from build scripts. A terminal's edited copy goes when the program clears the screen. tinywin.snap is gone; perf baselines are re-recorded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index 3910ac05..7b73dc0e 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -938,7 +938,7 @@ test "event records are acme's bytes, one per read, and .again when empty" {
try testing.expectEqualStrings("ML0 ", rd(p, event, 0, 4).bytes);
try testing.expectEqualStrings("3 4 3 one\n", rd(p, event, 0, 4096).bytes);
- const big = "z" ** max_record_text;
+ const big = &@as([max_record_text]u8, @splat('z'));
_ = noteAction(p, 0, .body_exec, 0, max_record_text, 0, big);
try testing.expectEqualStrings("MX0 256 0 0 \n", rd(p, event, 0, 4096).bytes);
@@ -1388,7 +1388,7 @@ test "opens of the log share the open records, and a closed one frees its record
test "a click in the body reports the offsets of the word it takes, so the record can be written back" {
const config = @import("../config.zig");
const gpa = testing.allocator;
- const text = "alpha qty beta\n qty\n\tqty\ndef f(qty): return qty.x\n" ++ "w" ** 100 ++ " qty\n";
+ const text = "alpha qty beta\n qty\n\tqty\ndef f(qty): return qty.x\n" ++ &@as([100]u8, @splat('w')) ++ " qty\n";
const p = try withFile(gpa, text);
defer p.deinit();
// A scratch made over 9P, clicked while another pane has the keyboard.
@@ -1459,7 +1459,7 @@ test "follow new skips what the log held and waits for what comes after" {
test "a long msg record is cut between words at its cap, with an ellipsis" {
const p = try withFile(testing.allocator, "x\n");
defer p.deinit();
- const long = "word " ** 60; // 300 bytes
+ const long = std.mem.asBytes(&@as([60][5]u8, @splat("word ".*))); // 300 bytes
_ = wr(p, Node.of(serialOf(p), .ctl), "Msg " ++ long ++ "\n");
const log = @intFromEnum(tree.TopFile.log);
const h = call(p, .{ .tag = 1, .op = .open, .node = log }).reply.handle;
@@ -1485,7 +1485,7 @@ test "a record is one line of UTF-8: DEL and C1 are spaces, bytes not UTF-8 are
test "a long err record keeps its end, its middle given up to an ellipsis" {
const p = try withFile(testing.allocator, "x\n");
defer p.deinit();
- _ = wr(p, @intFromEnum(tree.TopFile.ctl), "Bogus" ++ "abcdefgh" ** 40 ++ "\n");
+ _ = wr(p, @intFromEnum(tree.TopFile.ctl), "Bogus" ++ std.mem.asBytes(&@as([40][8]u8, @splat("abcdefgh".*))) ++ "\n");
const log = @intFromEnum(tree.TopFile.log);
const h = call(p, .{ .tag = 1, .op = .open, .node = log }).reply.handle;
const text = call(p, .{ .tag = 2, .op = .read, .node = log, .handle = h, .size = 1 << 16 }).bytes;
@@ -1500,7 +1500,7 @@ test "a long err record keeps its end, its middle given up to an ellipsis" {
test "two failures that agree only in what their records cut are two records, not one counted" {
const p = try th.withFile(testing.allocator, "x\n");
defer p.deinit();
- const long = "why " ** 80;
+ const long = std.mem.asBytes(&@as([80][4]u8, @splat("why ".*)));
p.setMessage(0, long ++ "first");
p.setMessage(0, long ++ "second");
try testing.expect(!th.logHas(p, "(x2)"));