master
1#target=x86_64-linux-selfhosted
2#target=x86_64-windows-selfhosted
3#target=x86_64-linux-cbe
4#target=x86_64-windows-cbe
5#target=wasm32-wasi-selfhosted
6
7#update=initial version
8#file=main.zig
9pub fn main() !void {
10 _ = @import("foo.zig");
11 try std.fs.File.stdout().writeAll("success\n");
12}
13const std = @import("std");
14#file=foo.zig
15comptime {
16 _ = @import("bad.zig");
17}
18#expect_error=bad.zig:1:1: error: unable to load 'bad.zig': FileNotFound
19#expect_error=foo.zig:2:17: note: file imported here
20
21#update=change bad import
22#file=foo.zig
23comptime {
24 _ = @import("this_is/not_real.zig");
25}
26#expect_error=this_is/not_real.zig:1:1: error: unable to load 'not_real.zig': FileNotFound
27#expect_error=foo.zig:2:17: note: file imported here
28
29#update=remove import of 'foo.zig'
30#file=main.zig
31pub fn main() !void {
32 //_ = @import("foo.zig");
33 try std.fs.File.stdout().writeAll("success\n");
34}
35const std = @import("std");
36#expect_stdout="success\n"