#exe {
-Mroot=main.zig
#}

#write main.zig {
pub fn main() !void {
    try @import("foo.zig").hello();
}
#}
#write foo.zig {
pub fn hello() !void {
    try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
}
#}
#update {
error#}
#check errors {
foo.zig:2:9: error: use of undeclared identifier 'std'
#}

#write foo.zig {
const std = @import("std");
pub fn hello() !void {
    try std.Io.File.stdout().writeStreamingAll(io, "Hello, World!\n");
}
const io = std.Io.Threaded.global_single_threaded.io();
#}
#update {
fix the error#}
#check stdout {
Hello, World!
#}

#write foo.zig {
const std = @import("std");
pub fn hello() !void {
    try std.Io.File.stdout().writeStreamingAll(io, hello_str);
}
const io = std.Io.Threaded.global_single_threaded.io();
#}
#update {
add new error#}
#check errors {
foo.zig:3:52: error: use of undeclared identifier 'hello_str'
#}

#write foo.zig {
const std = @import("std");
const hello_str = "Hello, World! Again!\n";
pub fn hello() !void {
    try std.Io.File.stdout().writeStreamingAll(io, hello_str);
}
const io = std.Io.Threaded.global_single_threaded.io();
#}
#update {
fix the new error#}
#check stdout {
Hello, World! Again!
#}
