Several fixes for File.extract
Tweaks and fixes.
This commit is contained in:
+9
-2
@@ -80,8 +80,6 @@ pub const Reader = struct {
|
||||
|
||||
test "root iter" {
|
||||
const test_sfs_path = "testing/LinuxPATest.sfs";
|
||||
// const test_file_path = "PortableApps/PortableApps.com/Data/PortableAppsMenu.ini";
|
||||
|
||||
var rdr: Reader = try .init(std.testing.allocator, test_sfs_path, 0);
|
||||
defer rdr.deinit();
|
||||
var rootIter = try rdr.root.iterator(&rdr);
|
||||
@@ -90,3 +88,12 @@ test "root iter" {
|
||||
std.debug.print("{s}\n", .{f.name});
|
||||
}
|
||||
}
|
||||
|
||||
test "extract" {
|
||||
const test_sfs_path = "testing/LinuxPATest.sfs";
|
||||
const extract_path = "testing/testExtract";
|
||||
try std.fs.cwd().deleteTree(extract_path);
|
||||
var rdr: Reader = try .init(std.testing.allocator, test_sfs_path, 0);
|
||||
defer rdr.deinit();
|
||||
try rdr.root.extract(&rdr, extract_path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user