diff --git a/build.zig b/build.zig index 33acdc7..841c600 100644 --- a/build.zig +++ b/build.zig @@ -100,6 +100,7 @@ fn runZig( .root_source_file = b.path("src/main.zig"), .target = b.resolveTargetQuery(target), .optimize = optimize, + .link_libc = true, }); unit_tests.addCSourceFile(.{ .file = b.path("stb/stb.c") }); unit_tests.addIncludePath(dep_stb.path("")); diff --git a/readme.md b/readme.md index ce7fb51..ca20f76 100644 --- a/readme.md +++ b/readme.md @@ -57,7 +57,7 @@ run the program with the following options (the default zig install directory is with brightness boost and url input: ```bash # bonus (this is a sweet wallpaper) - asciigen -i "https://w.wallhaven.cc/full/p9/wallhaven-p9gr2p.jpg" -o output.png -c -e -b 1.5 + asciigen -i "https://w.wallhaven.cc/full/p9/wallhaven-p9gr2p.jpg" -o output.png -e -c-b 1.5 ``` 3. the program will generate an ascii art version of your input image and save it as a new image file. diff --git a/src/main.zig b/src/main.zig index 98644cf..70ffda2 100644 --- a/src/main.zig +++ b/src/main.zig @@ -731,7 +731,12 @@ test "test_ascii_generation" { // Create a temporary file path var tmp_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; - const tmp_path = try std.fmt.bufPrintZ(&tmp_path_buf, "test_ascii_output.png", .{}); + try std.fs.cwd().makePath("test_output"); + const tmp_path = try std.fmt.bufPrintZ( + &tmp_path_buf, + "test_output/test_ascii_output.png", + .{}, + ); // Set up test arguments const test_args = Args{