Skip to content

Commit

Permalink
fetch: Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
castholm committed Feb 28, 2025
1 parent 33d2a58 commit 9da3e10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Package/Fetch.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,7 @@ test "zip" {
defer fb.deinit();

try fetch.run();
try std.testing.expectEqual(.path, fetch.actual_path_or_url_kind);

var out = try fb.packageDir();
defer out.close();
Expand Down Expand Up @@ -2111,6 +2112,7 @@ test "zip with one root folder" {
defer fb.deinit();

try fetch.run();
try std.testing.expectEqual(.path, fetch.actual_path_or_url_kind);

var out = try fb.packageDir();
defer out.close();
Expand Down Expand Up @@ -2185,6 +2187,7 @@ test "tarball with excluded duplicate paths" {
"12200bafe035cbb453dd717741b66e9f9d1e6c674069d06121dafa1b2e62eb6b22da",
&hex_digest,
);
try std.testing.expectEqual(.path, fetch.actual_path_or_url_kind);

const expected_files: []const []const u8 = &.{
"build.zig",
Expand Down Expand Up @@ -2229,6 +2232,7 @@ test "tarball without root folder" {
"12209f939bfdcb8b501a61bb4a43124dfa1b2848adc60eec1e4624c560357562b793",
&hex_digest,
);
try std.testing.expectEqual(.path, fetch.actual_path_or_url_kind);

const expected_files: []const []const u8 = &.{
"build.zig",
Expand Down Expand Up @@ -2267,6 +2271,7 @@ test "set executable bit based on file content" {
"1220fecb4c06a9da8673c87fe8810e15785f1699212f01728eadce094d21effeeef3",
&Manifest.hexDigest(fetch.actual_hash),
);
try std.testing.expectEqual(.path, fetch.actual_path_or_url_kind);

var out = try fb.packageDir();
defer out.close();
Expand Down Expand Up @@ -2351,6 +2356,7 @@ const TestFetchBuilder = struct {
.has_build_zig = false,
.oom_flag = false,
.latest_commit = null,
.actual_path_or_url_kind = undefined,

.module = null,
};
Expand Down

0 comments on commit 9da3e10

Please sign in to comment.