incremental: add test for ZON file without result type

This commit is contained in:
mlugg 2025-04-02 05:51:42 +01:00
parent d8ac37fcc8
commit dd3f01eadf
No known key found for this signature in database
GPG key ID: 3F5B7DCCBF4AF02E

View file

@ -0,0 +1,24 @@
#target=x86_64-linux-selfhosted
#target=x86_64-linux-cbe
#target=x86_64-windows-cbe
//#target=wasm32-wasi-selfhosted
#update=initial version
#file=main.zig
const std = @import("std");
pub fn main() !void {
try std.io.getStdOut().writeAll(@import("foo.zon").message);
}
#file=foo.zon
.{
.message = "Hello, World!\n",
.a_number = 0,
}
#expect_stdout="Hello, World!\n"
#update=change ZON file
#file=foo.zon
.{
.message = "Hello again, World!\n",
.b_number = 0,
}
#expect_stdout="Hello again, World!\n"