@@ -423,7 +423,7 @@ pub fn zigTriple(self: Query, gpa: Allocator) Allocator.Error![]u8 {
423
423
try formatVersion (v , gpa , & result );
424
424
},
425
425
.windows = > | v | {
426
- try result .print (gpa , "{d }" , .{v });
426
+ try result .print (gpa , "{f }" , .{v });
427
427
},
428
428
}
429
429
}
@@ -437,7 +437,7 @@ pub fn zigTriple(self: Query, gpa: Allocator) Allocator.Error![]u8 {
437
437
.windows = > | v | {
438
438
// This is counting on a custom format() function defined on `WindowsVersion`
439
439
// to add a prefix '.' and make there be a total of three dots.
440
- try result .print (gpa , "..{d }" , .{v });
440
+ try result .print (gpa , "..{f }" , .{v });
441
441
},
442
442
}
443
443
}
@@ -729,4 +729,20 @@ test parse {
729
729
defer std .testing .allocator .free (text );
730
730
try std .testing .expectEqualSlices (u8 , "aarch64-linux.3.10...4.4.1-android.30" , text );
731
731
}
732
+ {
733
+ const query = try Query .parse (.{
734
+ .arch_os_abi = "x86-windows.xp...win8-msvc" ,
735
+ });
736
+ const target = try std .zig .system .resolveTargetQuery (query );
737
+
738
+ try std .testing .expect (target .cpu .arch == .x86 );
739
+ try std .testing .expect (target .os .tag == .windows );
740
+ try std .testing .expect (target .os .version_range .windows .min == .xp );
741
+ try std .testing .expect (target .os .version_range .windows .max == .win8 );
742
+ try std .testing .expect (target .abi == .msvc );
743
+
744
+ const text = try query .zigTriple (std .testing .allocator );
745
+ defer std .testing .allocator .free (text );
746
+ try std .testing .expectEqualSlices (u8 , "x86-windows.xp...win8-msvc" , text );
747
+ }
732
748
}
0 commit comments