diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-07-22 13:40:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-22 13:40:25 -0700 |
| commit | 49cf8d80a6f689d97c8ddfa2b972da8858c07176 (patch) | |
| tree | c494449b4d1846da05360ecbb5ba9306f3478072 | |
| parent | 7eab97653d204671d37da79dab86a2cec50f5af7 (diff) | |
| parent | cc0a688b5dc33efde0c7dd916562a18bab9be1a2 (diff) | |
core: use std.testing.expectEqualStrings where appropriate (#8025)
| -rw-r--r-- | src/font/face/coretext.zig | 2 | ||||
| -rw-r--r-- | src/terminal/UTF8Decoder.zig | 2 | ||||
| -rw-r--r-- | src/terminal/osc.zig | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/font/face/coretext.zig b/src/font/face/coretext.zig index bb9a472d2..cde50ab37 100644 --- a/src/font/face/coretext.zig +++ b/src/font/face/coretext.zig @@ -1001,7 +1001,7 @@ test "name" { var buf: [1024]u8 = undefined; const font_name = try face.name(&buf); - try testing.expect(std.mem.eql(u8, font_name, "Menlo")); + try testing.expectEqualStrings(font_name, "Menlo"); } test "emoji" { diff --git a/src/terminal/UTF8Decoder.zig b/src/terminal/UTF8Decoder.zig index 6bb0d9815..716dac409 100644 --- a/src/terminal/UTF8Decoder.zig +++ b/src/terminal/UTF8Decoder.zig @@ -95,7 +95,7 @@ test "ASCII" { } } - try testing.expect(std.mem.eql(u8, &out, "Hello, World!")); + try testing.expectEqualStrings(&out, "Hello, World!"); } test "Well formed utf-8" { diff --git a/src/terminal/osc.zig b/src/terminal/osc.zig index 7875f2037..7619c82c1 100644 --- a/src/terminal/osc.zig +++ b/src/terminal/osc.zig @@ -1904,7 +1904,7 @@ test "OSC: get/set clipboard" { const cmd = p.end(null).?; try testing.expect(cmd == .clipboard_contents); try testing.expect(cmd.clipboard_contents.kind == 's'); - try testing.expect(std.mem.eql(u8, "?", cmd.clipboard_contents.data)); + try testing.expectEqualStrings("?", cmd.clipboard_contents.data); } test "OSC: get/set clipboard (optional parameter)" { @@ -1918,7 +1918,7 @@ test "OSC: get/set clipboard (optional parameter)" { const cmd = p.end(null).?; try testing.expect(cmd == .clipboard_contents); try testing.expect(cmd.clipboard_contents.kind == 'c'); - try testing.expect(std.mem.eql(u8, "?", cmd.clipboard_contents.data)); + try testing.expectEqualStrings("?", cmd.clipboard_contents.data); } test "OSC: get/set clipboard with allocator" { @@ -1933,7 +1933,7 @@ test "OSC: get/set clipboard with allocator" { const cmd = p.end(null).?; try testing.expect(cmd == .clipboard_contents); try testing.expect(cmd.clipboard_contents.kind == 's'); - try testing.expect(std.mem.eql(u8, "?", cmd.clipboard_contents.data)); + try testing.expectEqualStrings("?", cmd.clipboard_contents.data); } test "OSC: clear clipboard" { @@ -1948,7 +1948,7 @@ test "OSC: clear clipboard" { const cmd = p.end(null).?; try testing.expect(cmd == .clipboard_contents); try testing.expect(cmd.clipboard_contents.kind == 'c'); - try testing.expect(std.mem.eql(u8, "", cmd.clipboard_contents.data)); + try testing.expectEqualStrings("", cmd.clipboard_contents.data); } test "OSC: report pwd" { @@ -1961,7 +1961,7 @@ test "OSC: report pwd" { const cmd = p.end(null).?; try testing.expect(cmd == .report_pwd); - try testing.expect(std.mem.eql(u8, "file:///tmp/example", cmd.report_pwd.value)); + try testing.expectEqualStrings("file:///tmp/example", cmd.report_pwd.value); } test "OSC: report pwd empty" { @@ -1973,7 +1973,7 @@ test "OSC: report pwd empty" { for (input) |ch| p.next(ch); const cmd = p.end(null).?; try testing.expect(cmd == .report_pwd); - try testing.expect(std.mem.eql(u8, "", cmd.report_pwd.value)); + try testing.expectEqualStrings("", cmd.report_pwd.value); } test "OSC: pointer cursor" { @@ -1986,7 +1986,7 @@ test "OSC: pointer cursor" { const cmd = p.end(null).?; try testing.expect(cmd == .mouse_shape); - try testing.expect(std.mem.eql(u8, "pointer", cmd.mouse_shape.value)); + try testing.expectEqualStrings("pointer", cmd.mouse_shape.value); } test "OSC: longer than buffer" { |
