fix example tests

This commit is contained in:
David Allemang
2024-11-11 12:03:37 -05:00
parent 4173229b20
commit 5ac1a9b7b9
6 changed files with 2511 additions and 1310 deletions

3
.envrc Normal file
View File

@@ -0,0 +1,3 @@
PATH_add zig-out/bin
source .venv/bin/activate

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
.zig-cache/
zig-out/
.spec/

View File

@@ -38,7 +38,9 @@ pub fn build(b: *std.Build) void {
.optimize = optimize,
});
const run_example_tests = b.addRunArtifact(example_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_exe_unit_tests.step);
test_step.dependOn(&example_tests.step);
test_step.dependOn(&run_example_tests.step);
}

View File

@@ -2,6 +2,8 @@ The spec is organized into "content blocks", "leaf blocks", and inline content.
So the first task in the parser should be to parse the block structure.
<https://spec.commonmark.org/0.31.2/>
- Blocks
- Leaf
- Thematic break

File diff suppressed because it is too large Load Diff

View File

@@ -21,10 +21,14 @@ pub fn find_blocks(src: []const u8, blocks: *std.ArrayList([]const u8)) !void {
}
pub fn convert(alloc: std.mem.Allocator, md: []const u8) ![]const u8 {
_ = alloc;
_ = md;
return error.UhOh;
return try alloc.dupe(u8, md);
// _ = alloc;
// _ = md;
// return error.UhOh;
// return error.NotImplemented;
// return alloc.dupe(u8, "Hello World!");
}
pub fn main() !void {