| 1 | #update=initial version |
| 2 | #file=main.zig |
| 3 | const std = @import("std"); |
| 4 | pub fn main() !void { |
| 5 | const str = getStr(); |
| 6 | try std.Io.File.stdout().writeStreamingAll(io, str); |
| 7 | } |
| 8 | inline fn getStr() []const u8 { |
| 9 | return "foo\n"; |
| 10 | } |
| 11 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 12 | #expect_stdout="foo\n" |
| 13 | #update=change the string |
| 14 | #file=main.zig |
| 15 | const std = @import("std"); |
| 16 | pub fn main() !void { |
| 17 | const str = getStr(); |
| 18 | try std.Io.File.stdout().writeStreamingAll(io, str); |
| 19 | } |
| 20 | inline fn getStr() []const u8 { |
| 21 | return "bar\n"; |
| 22 | } |
| 23 | const io = std.Io.Threaded.global_single_threaded.io(); |
| 24 | #expect_stdout="bar\n" |