mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
27 lines
589 B
Plaintext
27 lines
589 B
Plaintext
#target=x86_64-linux-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.getStdOut().writeAll(str);
|
|
}
|
|
inline fn getStr() []const u8 {
|
|
return "foo\n";
|
|
}
|
|
#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.getStdOut().writeAll(str);
|
|
}
|
|
inline fn getStr() []const u8 {
|
|
return "bar\n";
|
|
}
|
|
#expect_stdout="bar\n"
|