fix example tests
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
.zig-cache/
|
||||||
|
zig-out/
|
||||||
|
|
||||||
|
.spec/
|
||||||
|
|
@@ -38,7 +38,9 @@ pub fn build(b: *std.Build) void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const run_example_tests = b.addRunArtifact(example_tests);
|
||||||
|
|
||||||
const test_step = b.step("test", "Run unit tests");
|
const test_step = b.step("test", "Run unit tests");
|
||||||
test_step.dependOn(&run_exe_unit_tests.step);
|
test_step.dependOn(&run_exe_unit_tests.step);
|
||||||
test_step.dependOn(&example_tests.step);
|
test_step.dependOn(&run_example_tests.step);
|
||||||
}
|
}
|
||||||
|
2
notes.md
2
notes.md
@@ -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.
|
So the first task in the parser should be to parse the block structure.
|
||||||
|
|
||||||
|
<https://spec.commonmark.org/0.31.2/>
|
||||||
|
|
||||||
- Blocks
|
- Blocks
|
||||||
- Leaf
|
- Leaf
|
||||||
- Thematic break
|
- Thematic break
|
||||||
|
3797
src/examples.zig
3797
src/examples.zig
File diff suppressed because it is too large
Load Diff
10
src/main.zig
10
src/main.zig
@@ -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 {
|
pub fn convert(alloc: std.mem.Allocator, md: []const u8) ![]const u8 {
|
||||||
_ = alloc;
|
return try alloc.dupe(u8, md);
|
||||||
_ = md;
|
|
||||||
return error.UhOh;
|
// _ = alloc;
|
||||||
|
// _ = md;
|
||||||
|
// return error.UhOh;
|
||||||
// return error.NotImplemented;
|
// return error.NotImplemented;
|
||||||
|
|
||||||
|
// return alloc.dupe(u8, "Hello World!");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
|
Reference in New Issue
Block a user