Skip to content

Commit bf325c1

Browse files
author
Pushkar N Kulkarni
authored
Merge pull request #1131 from ianpartridge/sr-3363
NSString: add test for substring of unpaired surrogate
2 parents e0ad608 + f1f6841 commit bf325c1

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)