Commit cad69e2c29

Alex Rønne Petersen <alex@alexrp.com>
2024-08-17 13:47:12
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.
1 parent 85747b2
Changed files (1)
lib
std
Target
lib/std/Target/Query.zig
@@ -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(.{