Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Econa77 committed Jan 12, 2025
1 parent e0fa8d6 commit b45d84f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Lib/SauceTests/KeyboardLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,18 @@ final class KeyboardLayoutTests: XCTestCase {
private let QWERTYVKeyCode = 9
private let DvorakVKeyCode = 47 // swiftlint:disable:this identifier_name

private var selectedInputSource: InputSource?
private static var selectedInputSource: InputSource?

override func setUp() {
override static func setUp() {
super.setUp()
selectedInputSource = InputSource(source: TISCopyCurrentKeyboardLayoutInputSource().takeUnretainedValue())
}

override func tearDown() {
override static func tearDown() {
super.tearDown()
guard let selectedInputSource else { return }
selectInputSource(id: selectedInputSource.id)
TISEnableInputSource(selectedInputSource.source)
TISSelectInputSource(selectedInputSource.source)
}

// MARK: - Tests
Expand Down

0 comments on commit b45d84f

Please # to comment.