std.Target.Query: Fix parse test on ABIs like gnueabi, gnuabi64, etc.

The `zigTriple()` implementation simply returns `gnu` when a glibc version is provided but a more specific ABI isn't.
This commit is contained in:
Alex Rønne Petersen 2024-08-17 13:47:12 +02:00 committed by Andrew Kelley
parent 85747b266a
commit cad69e2c29

View File

@ -588,14 +588,7 @@ test parse {
const text = try query.zigTriple(std.testing.allocator);
defer std.testing.allocator.free(text);
var buf: [256]u8 = undefined;
const triple = std.fmt.bufPrint(
buf[0..],
"native-native-{s}.2.1.1",
.{@tagName(builtin.target.abi)},
) catch unreachable;
try std.testing.expectEqualSlices(u8, triple, text);
try std.testing.expectEqualSlices(u8, "native-native-gnu.2.1.1", text);
}
{
const query = try Query.parse(.{