Files
test/guide/language/hello-world.zig
2026-01-19 05:43:29 +09:00

16 lines
325 B
Zig

const std = @import("std");
const print = std.debug.print;
// $ zig run hello-world.zig
pub fn main() void {
print("Hello, {s}!\n", .{"World"});
}
pub fn test_hello_world() []const u8 {
return "Hello, Test!\n";
}
test "hello-world" {
try std.testing.expectEqualStrings(test_hello_world(), "Hello, Test!\n");
}