| ... | ... | @@ -100,7 +100,7 @@ pub const EnvMap = struct { |
| 100 | 100 | if (upcase(c_a) != upcase(c_b)) |
| 101 | 101 | return false; |
| 102 | 102 | } |
| 103 | | if (it_b.nextCodepoint()) |_| return false; |
| 103 | return if (it_b.nextCodepoint()) |_| false else true; |
| 104 | 104 | } |
| 105 | 105 | return std.hash_map.eqlString(a, b); |
| 106 | 106 | } |
| ... | ... | @@ -232,6 +232,12 @@ test "EnvMap" { |
| 232 | 232 | try testing.expect(env.get("SOMETHING_NEW") == null); |
| 233 | 233 | |
| 234 | 234 | try testing.expectEqual(@as(EnvMap.Size, 1), env.count()); |
| 235 | |
| 236 | // test Unicode case-insensitivity on Windows |
| 237 | if (builtin.os.tag == .windows) { |
| 238 | try env.put("КИРиллИЦА", "something else"); |
| 239 | try testing.expectEqualStrings("something else", env.get("кириллица").?); |
| 240 | } |
| 235 | 241 | } |
| 236 | 242 | |
| 237 | 243 | /// Returns a snapshot of the environment variables of the current process. |