Skip to content

Commit 52782cf

Browse files
authored
Merge pull request swiftlang#26882 from lorentey/delete-forward
[test] Add a quick test for NSEvent.SpecialKey.deleteForward’s rawValue
2 parents e136834 + 48a4dda commit 52782cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/stdlib/NSEvent.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ func testSpecialKey(_ specialKey: NSEvent.SpecialKey, rawValue: Int) {
1616

1717
NSEventTests.test("NSEvent.specialKey") {
1818
testSpecialKey(NSEvent.SpecialKey.upArrow, rawValue: 0xF700)
19+
20+
if #available(macOS 9999, *) {
21+
// NSEvent.SpecialKey.deleteForward used to have the wrong rawValue in
22+
// macOS 10.15 and below. See https://github.com/apple/swift/pull/26853
23+
// (rdar://54725550).
24+
testSpecialKey(NSEvent.SpecialKey.deleteForward, rawValue: 0xF728)
25+
}
1926
}
2027

2128
runAllTests()

0 commit comments

Comments
 (0)