zig/test/incremental/modify_inline_fn
Andrew Kelley debf307594 update all incremental tests to new std API
they're still not passing on windows for some reason though
2025-12-23 22:15:11 -08:00

29 lines
775 B
Text

#target=x86_64-linux-selfhosted
#target=x86_64-windows-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
#target=wasm32-wasi-selfhosted
#update=initial version
#file=main.zig
const std = @import("std");
pub fn main() !void {
const str = getStr();
try std.Io.File.stdout().writeStreamingAll(io, str);
}
inline fn getStr() []const u8 {
return "foo\n";
}
const io = std.Io.Threaded.global_single_threaded.ioBasic();
#expect_stdout="foo\n"
#update=change the string
#file=main.zig
const std = @import("std");
pub fn main() !void {
const str = getStr();
try std.Io.File.stdout().writeStreamingAll(io, str);
}
inline fn getStr() []const u8 {
return "bar\n";
}
const io = std.Io.Threaded.global_single_threaded.ioBasic();
#expect_stdout="bar\n"