Skip to content

Commit dd6bbf9

Browse files
committed
Fix test error
1 parent 4a10ead commit dd6bbf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/URLPatternTests/URLPatternTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ final class URLPatternTests: XCTestCase {
130130
}
131131
132132
static func isURLPathValue(_ string: String) -> Bool {
133-
return string.hasPrefix("{") && string.hasSuffix("}")
133+
return string.hasPrefix("{") && string.hasSuffix("}") && string.utf16.count >= 3
134134
}
135135
}
136136
""",
@@ -189,7 +189,7 @@ final class URLPatternTests: XCTestCase {
189189
}
190190
191191
static func isURLPathValue(_ string: String) -> Bool {
192-
return string.hasPrefix("{") && string.hasSuffix("}")
192+
return string.hasPrefix("{") && string.hasSuffix("}") && string.utf16.count >= 3
193193
}
194194
}
195195
""",

0 commit comments

Comments
 (0)