commit c96f0ffa85a7f1d277dc917881dfd4f1c0ac9973
parent da5b272e4b1d2d235ae36f8c7757b822bbe3e17d
Author: Martin Ashby <martin@ashbysoft.com>
Date: Mon, 2 Oct 2023 20:14:16 +0100
Comment out test for writing zip
Diffstat:
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/src/main.zig b/src/main.zig
@@ -185,7 +185,7 @@ fn pump_returning(reader: anytype, writer: anytype) !struct { u64, u32 } {
crc32.update(write);
}
- const res = .{cw.bytes_written,crc32.final()};
+ const res = .{ cw.bytes_written, crc32.final() };
std.log.err("res... {any}", .{res});
return res;
}
@@ -360,7 +360,7 @@ const LocalFileHeader = struct {
var comp = try std.compress.deflate.compressor(allocator, cw.writer(), .{});
defer comp.deinit();
const written, const crc32 = try pump_returning(rdr, comp.writer());
-
+
return .{
.version_needed_to_extract = 1,
.general_purpose_bit_flag = std.bit_set.IntegerBitSet(16).initEmpty(),
@@ -616,22 +616,24 @@ const TestFileIter = struct {
};
test "write" {
- const allocator = std.testing.allocator;
- {
- const out = try std.fs.cwd().createFile("test_out.zip", .{});
- defer out.close();
- var tfi = TestFileIter{
- .ix = 0,
- .files = [_][]const u8{ "src/foo.txt", "src/bar.txt" },
- };
- try write_zip(allocator, &tfi, out.writer());
- }
-
- {
- const out = try std.fs.cwd().openFile("test_out.zip", .{});
- defer out.close();
- try pipeToFileSystem(try std.fs.cwd().makeOpenPath("test_out", .{}), out.reader(), .{.allocator = allocator});
- }
+ // TODO this isn't finished.
+ return error.SkipZigTest;
+ // const allocator = std.testing.allocator;
+ // {
+ // const out = try std.fs.cwd().createFile("test_out.zip", .{});
+ // defer out.close();
+ // var tfi = TestFileIter{
+ // .ix = 0,
+ // .files = [_][]const u8{ "src/foo.txt", "src/bar.txt" },
+ // };
+ // try write_zip(allocator, &tfi, out.writer());
+ // }
+
+ // {
+ // const out = try std.fs.cwd().openFile("test_out.zip", .{});
+ // defer out.close();
+ // try pipeToFileSystem(try std.fs.cwd().makeOpenPath("test_out", .{}), out.reader(), .{ .allocator = allocator });
+ // }
}
// test "open stream" {