Skip to content

Commit f1f6841

Browse files
committed
NSString: add test for substring of unpaired surrogate
1 parent e0ad608 commit f1f6841

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

TestFoundation/TestNSString.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,6 +1134,10 @@ class TestNSString : XCTestCase {
11341134

11351135
let s5 = NSString(string: "\r\ncats😺")
11361136
XCTAssertEqual(s5.substring(with: NSMakeRange(1,6)), "\ncats�")
1137+
1138+
// SR-3363
1139+
let s6 = NSString(string: "Beyonce\u{301} and Tay")
1140+
XCTAssertEqual(s6.substring(with: NSMakeRange(7, 9)), "\u{301} and Tay")
11371141
}
11381142
}
11391143

0 commit comments

Comments
 (0)