blob: 19e201f1d9e2e994c8ff65c4fe780e96d8c818b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#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"
|