1#exe {
2-Mroot=main.zig
3#}
4
5#write main.zig {
6pub fn main() !void {
7 _ = @import("foo.zig");
8 try std.Io.File.stdout().writeStreamingAll(io, "success\n");
9}
10const std = @import("std");
11const io = std.Io.Threaded.global_single_threaded.io();
12#}
13#write foo.zig {
14comptime {
15 _ = @import("bad.zig");
16}
17#}
18#update
19#check errors {
20bad.zig:1:1: error: unable to load "bad.zig": FileNotFound
21foo.zig:2:17: note: file imported here
22#}
23
24#write foo.zig {
25comptime {
26 _ = @import("this_is/not_real.zig");
27}
28#}
29#update "change bad import"
30#check errors {
31this_is/not_real.zig:1:1: error: unable to load "not_real.zig": FileNotFound
32foo.zig:2:17: note: file imported here
33#}
34
35#write main.zig {
36pub fn main() !void {
37 //_ = @import("foo.zig");
38 try std.Io.File.stdout().writeStreamingAll(io, "success\n");
39}
40const std = @import("std");
41const io = std.Io.Threaded.global_single_threaded.io();
42#}
43#update "remove import of 'foo.zig'"
44#check stdout {
45success
46#}