zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 43d5bea7af8933723a457da45714b144d95e2c70 (tree)
parent 584b8f281e18f509600026e18f83dfd9621fe591
Author: Jan200101 <sentrycraft123@gmail.com>
Date:   Sat, 14 Mar 2026 12:41:14 +0100

test: use expectEqualStrings to check cmakedefine behavior

this has the added benefit of outputting the difference making it
easier to figure out why the test is flakey.

https://codeberg.org/ziglang/zig/issues/31368

Diffstat:
Mtest/standalone/cmakedefine/check.zig | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/standalone/cmakedefine/check.zig b/test/standalone/cmakedefine/check.zig @@ -1,3 +1,6 @@ +const std = @import("std"); +const builtin = @import("builtin"); + pub fn main(init: std.process.Init) !void { const arena = init.arena.allocator(); const io = init.io; @@ -17,10 +20,7 @@ pub fn main(init: std.process.Init) !void { } const actual_without_comment = actual[comment_str.len..]; - if (true) return; // https://codeberg.org/ziglang/zig/issues/31368 + if (builtin.os.tag == .windows) return; // https://codeberg.org/ziglang/zig/issues/30138 - if (!std.mem.eql(u8, actual_without_comment, expected)) { - return error.DoesNotMatch; - } + try std.testing.expectEqualStrings(expected, actual_without_comment); } -const std = @import("std");