authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-01 20:53:24 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-01-01 20:53:24 -08:00
log54c2e792a3916fa227322f62bfe8f5a01a25aac4
tree7249958639cc2c1cecb668cfbceaf36da6711870
parent9c1edaafed430d8e85175781781eba6214e4cb13

use expect in tests


3 files changed, 6 insertions(+), 1 deletions(-)

licenses.txt+1
......@@ -1,5 +1,6 @@
11MIT:
22= https://spdx.org/licenses/MIT
33- This
4- git https://github.com/nektro/zig-expect
45- git https://github.com/nektro/zig-extras
56- git https://github.com/yaml/libyaml
test.zig+2-1
......@@ -1,5 +1,6 @@
11const std = @import("std");
22const yaml = @import("yaml");
3const expect = @import("expect").expect;
34
45const file = @embedFile("./zigmod.yml");
56
......@@ -7,5 +8,5 @@ test {
78 const doc = try yaml.parse(std.testing.allocator, file);
89 defer doc.deinit(std.testing.allocator);
910
10 try std.testing.expectEqualStrings("g982zq6e8wsvnmduerpbf8787hu85brugmngn8wf", doc.mapping.get_string("id").?);
11 try expect(doc.mapping.get_string("id").?).toEqualString("g982zq6e8wsvnmduerpbf8787hu85brugmngn8wf");
1112}
zigmod.yml+3
......@@ -26,3 +26,6 @@ dependencies:
2626 - src/writer.c
2727
2828 - src: git https://github.com/nektro/zig-extras
29
30root_dependencies:
31 - src: git https://github.com/nektro/zig-expect