Skip to content

Commit 2f640f1

Browse files
authored
Merge pull request #18114 from milseman/4_2_uniguard
[test] Guard OS-dependent Unicode behavior with check
2 parents a8f954e + 368e95b commit 2f640f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/stdlib/Character.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ CharacterTests.test("Unicode 9 grapheme breaking") {
202202
// Only run it on ObjC platforms. Supported Linux versions do not have a
203203
// recent enough ICU for Unicode 9 support.
204204
#if _runtime(_ObjC)
205+
// Check for Unicode 9 or later
206+
guard #available(iOS 10.0, macOS 10.12, *) else { return }
207+
205208
let flags = "🇺🇸🇨🇦🇩🇰🏳️‍🌈"
206209
expectEqual(4, flags.count)
207210
expectEqual(flags.reversed().count, flags.count)

0 commit comments

Comments
 (0)