test "inheritance" { var data: Data = .init(allocator, std.testing.io); defer data.deinit(); const output = try zmpl.Templates.inheritance_child.renderWithLayout( zmpl.Templates.inheritance_parent3, &data, struct {}, .{}, ); try expectEqualStrings( \\

Parent 1

\\
\\

Parent 2

\\
\\

Parent 3

\\
\\ Content \\
\\
\\
, output); } test "root init" { var data: Data = .init(allocator, std.testing.io); defer data.deinit(); var root = try data.root(.object); var user = try data.object(); var auth = try data.object(); try user.put("email", data.string("user@example.com")); try auth.put("token", data.string("abc123-456-def")); try root.put("user", user); try root.put("auth", auth); const output = try zmpl.Templates.example.render(&data, .{}); try expectEqualStrings( \\ \\ Zmpl is simple! \\ \\ \\
Email: user@example.com
\\
Token: abc123-456-def
\\ \\An example partial \\ \\user@example.com \\ \\user@example.com \\ \\user@example.com \\
Sign in
Unsubscribe
\\ \\

Built-in markdown support

\\ \\
\\ , output); }