Skip to content

Commit

Permalink
test/macho: adapt testFlatNamespaceWeak to differences between macOS …
Browse files Browse the repository at this point in the history
…versions
  • Loading branch information
kubkon committed Jan 24, 2024
1 parent 8985725 commit b97a0bb
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions test/macho.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1059,12 +1059,24 @@ fn testFlatNamespaceWeak(b: *Build, opts: Options) *Step {
test_step.dependOn(&check.step);

const run = exe.run();
run.expectStdOutEqual(
\\main=2
\\liba=2
\\libb=2
\\
);

// TODO: this is quite a huge difference between macOS versions.
// I wonder what changed in dyld's behaviour.
if (builtin.target.os.version_range.semver.isAtLeast(.{ .major = 12, .minor = 0, .patch = 0 }) orelse false) {
run.expectStdOutEqual(
\\main=2
\\liba=2
\\libb=2
\\
);
} else {
run.expectStdOutEqual(
\\main=2
\\liba=1
\\libb=2
\\
);
}
test_step.dependOn(run.step());
}

Expand Down

0 comments on commit b97a0bb

Please sign in to comment.