aboutsummaryrefslogtreecommitdiff
path: root/test/incremental/bad_import
blob: 9b6be8b1767c1612f046d8b0885d7ce6bd086cef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#target=x86_64-linux-selfhosted
#target=x86_64-windows-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
#target=wasm32-wasi-selfhosted

#update=initial version
#file=main.zig
pub fn main() !void {
    _ = @import("foo.zig");
    try std.fs.File.stdout().writeAll("success\n");
}
const std = @import("std");
#file=foo.zig
comptime {
    _ = @import("bad.zig");
}
#expect_error=bad.zig:1:1: error: unable to load 'bad.zig': FileNotFound
#expect_error=foo.zig:2:17: note: file imported here

#update=change bad import
#file=foo.zig
comptime {
    _ = @import("this_is/not_real.zig");
}
#expect_error=this_is/not_real.zig:1:1: error: unable to load 'not_real.zig': FileNotFound
#expect_error=foo.zig:2:17: note: file imported here

#update=remove import of 'foo.zig'
#file=main.zig
pub fn main() !void {
    //_ = @import("foo.zig");
    try std.fs.File.stdout().writeAll("success\n");
}
const std = @import("std");
#expect_stdout="success\n"