tar: add Go test case files to the project

This commit is contained in:
Igor Anić 2023-12-11 22:17:47 +01:00 committed by Andrew Kelley
parent c07527abac
commit f8e42d6b30
29 changed files with 3 additions and 5 deletions

View File

@ -618,10 +618,8 @@ test "tar run Go test cases" {
err: ?anyerror = null, // parsing should fail with this error
};
const test_dir = if (std.os.getenv("GO_TAR_TESTDATA_PATH")) |path|
try std.fs.openDirAbsolute(path, .{})
else
return error.SkipZigTest;
const src_path = comptime std.fs.path.dirname(@src().file) orelse ".";
const test_dir = try std.fs.cwd().openDir(src_path ++ "/../../test/cases/tar", .{});
const cases = [_]Case{
.{
@ -921,9 +919,9 @@ test "tar run Go test cases" {
for (cases) |case| {
var fs_file = try test_dir.openFile(case.path, .{});
defer fs_file.close();
//var iter = iterator(fs_file.reader(), null);
var iter = tarReader(fs_file.reader(), null);
var i: usize = 0;
while (iter.next() catch |err| {

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/gnu-utf8.tar Normal file

Binary file not shown.

BIN
test/cases/tar/gnu.tar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/neg-size.tar Normal file

Binary file not shown.

BIN
test/cases/tar/nil-uid.tar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/pax.tar Normal file

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/star.tar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/v7.tar Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
test/cases/tar/xattrs.tar Normal file

Binary file not shown.