| ... | @@ -892,9 +892,9 @@ fn testBlockHuff(in_name: []const u8, want_name: []const u8) !void { | ... | @@ -892,9 +892,9 @@ fn testBlockHuff(in_name: []const u8, want_name: []const u8) !void { |
| 892 | | 892 | |
| 893 | const current_dir = try std.fs.openDirAbsolute(std.fs.path.dirname(@src().file).?, .{}); | 893 | const current_dir = try std.fs.openDirAbsolute(std.fs.path.dirname(@src().file).?, .{}); |
| 894 | const testdata_dir = try current_dir.openDir("testdata", .{}); | 894 | const testdata_dir = try current_dir.openDir("testdata", .{}); |
| 895 | const in_file = try testdata_dir.openFile(in_name, .{ .read = true }); | 895 | const in_file = try testdata_dir.openFile(in_name, .{}); |
| 896 | defer in_file.close(); | 896 | defer in_file.close(); |
| 897 | const want_file = try testdata_dir.openFile(want_name, .{ .read = true }); | 897 | const want_file = try testdata_dir.openFile(want_name, .{}); |
| 898 | defer want_file.close(); | 898 | defer want_file.close(); |
| 899 | | 899 | |
| 900 | var in = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); | 900 | var in = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); |
| ... | @@ -1630,11 +1630,11 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void { | ... | @@ -1630,11 +1630,11 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void { |
| 1630 | defer testing.allocator.free(want_name); | 1630 | defer testing.allocator.free(want_name); |
| 1631 | | 1631 | |
| 1632 | if (!mem.eql(u8, ht.input, "")) { | 1632 | if (!mem.eql(u8, ht.input, "")) { |
| 1633 | const in_file = try testdata_dir.openFile(ht.input, .{ .read = true }); | 1633 | const in_file = try testdata_dir.openFile(ht.input, .{}); |
| 1634 | input = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); | 1634 | input = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); |
| 1635 | defer testing.allocator.free(input); | 1635 | defer testing.allocator.free(input); |
| 1636 | | 1636 | |
| 1637 | const want_file = try testdata_dir.openFile(want_name, .{ .read = true }); | 1637 | const want_file = try testdata_dir.openFile(want_name, .{}); |
| 1638 | want = try want_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); | 1638 | want = try want_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); |
| 1639 | defer testing.allocator.free(want); | 1639 | defer testing.allocator.free(want); |
| 1640 | | 1640 | |
| ... | @@ -1663,7 +1663,7 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void { | ... | @@ -1663,7 +1663,7 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void { |
| 1663 | want_name_no_input = try fmt.allocPrint(testing.allocator, ht.want_no_input, .{ttype.to_s()}); | 1663 | want_name_no_input = try fmt.allocPrint(testing.allocator, ht.want_no_input, .{ttype.to_s()}); |
| 1664 | defer testing.allocator.free(want_name_no_input); | 1664 | defer testing.allocator.free(want_name_no_input); |
| 1665 | | 1665 | |
| 1666 | const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{ .read = true }); | 1666 | const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{}); |
| 1667 | want_ni = try want_no_input_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); | 1667 | want_ni = try want_no_input_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize)); |
| 1668 | defer testing.allocator.free(want_ni); | 1668 | defer testing.allocator.free(want_ni); |
| 1669 | | 1669 | |