Fix std.testing.expectEqualStrings invocation for latest zig master build.

This commit is contained in:
Alexandros Naskos 2021-05-13 17:53:53 +03:00
parent 759a7b7fd9
commit 7fb7cdc36c
No known key found for this signature in database
GPG Key ID: 02BF2E72B0EA32D2

View File

@ -103,14 +103,12 @@ test "documentPositionContext" {
);
}
test "pathRelative and escapes" {
const join1 = try URI.pathRelative(allocator, "file://project/zig", "/src/main+.zig");
defer allocator.free(join1);
std.testing.expectEqualStrings("file://project/zig/src/main%2B.zig", join1);
try std.testing.expectEqualStrings("file://project/zig/src/main%2B.zig", join1);
const join2 = try URI.pathRelative(allocator, "file://project/zig/wow", "../]src]/]main.zig");
defer allocator.free(join2);
std.testing.expectEqualStrings("file://project/zig/%5Dsrc%5D/%5Dmain.zig", join2);
try std.testing.expectEqualStrings("file://project/zig/%5Dsrc%5D/%5Dmain.zig", join2);
}