authorgravatar for igor.anic@gmail.comIgor Anić <igor.anic@gmail.com> 2023-12-01 19:03:32+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-01-13 19:37:33-07:00
log2a432d3008fa1e9af645de96b08cbad57709ffb5
treea933267db31742f9636e7c6b2ececebe6ffc1fe8
parent2ed9a276a701cc55eccf4fcbf68476e797f1818b

tar: prefix test cases with 'tar'

To make it little easier to filter from all stdlib tests.

1 files changed, 3 insertions(+), 4 deletions(-)

lib/std/tar.zig+3-4
...@@ -628,7 +628,7 @@ fn stripComponents(path: []const u8, count: u32) ![]const u8 {...@@ -628,7 +628,7 @@ fn stripComponents(path: []const u8, count: u32) ![]const u8 {
628 return path[i..];628 return path[i..];
629}629}
630630
631test stripComponents {631test "tar stripComponents" {
632 const expectEqualStrings = std.testing.expectEqualStrings;632 const expectEqualStrings = std.testing.expectEqualStrings;
633 try expectEqualStrings("a/b/c", try stripComponents("a/b/c", 0));633 try expectEqualStrings("a/b/c", try stripComponents("a/b/c", 0));
634 try expectEqualStrings("b/c", try stripComponents("a/b/c", 1));634 try expectEqualStrings("b/c", try stripComponents("a/b/c", 1));
...@@ -667,7 +667,7 @@ fn noNull(str: []const u8) ![]const u8 {...@@ -667,7 +667,7 @@ fn noNull(str: []const u8) ![]const u8 {
667 return str;667 return str;
668}668}
669669
670test "parsePaxAttribute" {670test "tar parsePaxAttribute" {
671 const expectEqual = std.testing.expectEqual;671 const expectEqual = std.testing.expectEqual;
672 const expectEqualStrings = std.testing.expectEqualStrings;672 const expectEqualStrings = std.testing.expectEqualStrings;
673 const expectError = std.testing.expectError;673 const expectError = std.testing.expectError;
...@@ -700,7 +700,7 @@ const TestCase = struct {...@@ -700,7 +700,7 @@ const TestCase = struct {
700 err: ?anyerror = null, // parsing should fail with this error700 err: ?anyerror = null, // parsing should fail with this error
701};701};
702702
703test "tar: Go test cases" {703test "tar run Go test cases" {
704 const test_dir = if (std.os.getenv("GO_TAR_TESTDATA_PATH")) |path|704 const test_dir = if (std.os.getenv("GO_TAR_TESTDATA_PATH")) |path|
705 try std.fs.openDirAbsolute(path, .{})705 try std.fs.openDirAbsolute(path, .{})
706 else706 else
...@@ -1031,4 +1031,3 @@ const Md5Writer = struct {...@@ -1031,4 +1031,3 @@ const Md5Writer = struct {
1031 return std.fmt.bytesToHex(s, .lower);1031 return std.fmt.bytesToHex(s, .lower);
1032 }1032 }
1033};1033};
1034