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#update=initial version
7#file=main.zig
8const std = @import("std");
9pub fn main() !void {
10 try std.fs.File.stdout().writeAll(a);
11}
12const a = "Hello, World!\n";
13#expect_stdout="Hello, World!\n"
14
15#update=introduce compile error
16#file=main.zig
17const std = @import("std");
18pub fn main() !void {
19 try std.fs.File.stdout().writeAll(a);
20}
21const a = @compileError("bad a");
22#expect_error=main.zig:5:11: error: bad a
23
24#update=remove error reference
25#file=main.zig
26const std = @import("std");
27pub fn main() !void {
28 try std.fs.File.stdout().writeAll(b);
29}
30const a = @compileError("bad a");
31const b = "Hi there!\n";
32#expect_stdout="Hi there!\n"
33
34#update=introduce and remove reference to error
35#file=main.zig
36const std = @import("std");
37pub fn main() !void {
38 try std.fs.File.stdout().writeAll(a);
39}
40const a = "Back to a\n";
41const b = @compileError("bad b");
42#expect_stdout="Back to a\n"