mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
59 lines
1.3 KiB
Text
59 lines
1.3 KiB
Text
#target=x86_64-linux
|
|
#update=initial version
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(foo);
|
|
}
|
|
const foo = "good morning\n";
|
|
#expect_stdout="good morning\n"
|
|
|
|
#update=add new declaration
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(foo);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
#expect_stdout="good morning\n"
|
|
|
|
#update=reference new declaration
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(bar);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
#expect_stdout="good evening\n"
|
|
|
|
#update=reference missing declaration
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(qux);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
#expect_error=ignored
|
|
|
|
#update=add missing declaration
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(qux);
|
|
}
|
|
const foo = "good morning\n";
|
|
const bar = "good evening\n";
|
|
const qux = "good night\n";
|
|
#expect_stdout="good night\n"
|
|
|
|
#update=remove unused declarations
|
|
#file=main.zig
|
|
const std = @import("std");
|
|
pub fn main() !void {
|
|
try std.io.getStdOut().writeAll(qux);
|
|
}
|
|
const qux = "good night\n";
|
|
#expect_stdout="good night\n"
|