UI fixes
Some checks failed
CI / Test And Build (push) Has been cancelled

This commit is contained in:
Akshay Kolli
2026-07-08 01:13:02 -04:00
parent c7316105c7
commit d86d392c3a
46 changed files with 17543 additions and 1561 deletions

View File

@@ -66,6 +66,25 @@ final class ClipboardEncryptionServiceTests: XCTestCase {
XCTAssertEqual(service.protectData(Data("available only in memory".utf8)), Data("available only in memory".utf8))
}
func testSystemKeychainBypassIsEnabledForTestsAndExplicitEnvironment() {
XCTAssertTrue(ClipboardEncryptionService.shouldBypassSystemKeychain(
environment: ["XCTestConfigurationFilePath": "/tmp/ClipBoredTests.xctestconfiguration"],
arguments: ["/tmp/ClipBoredTests"]
))
XCTAssertTrue(ClipboardEncryptionService.shouldBypassSystemKeychain(
environment: ["CLIPBORED_DISABLE_KEYCHAIN": "1"],
arguments: ["/tmp/ClipBored"]
))
XCTAssertTrue(ClipboardEncryptionService.shouldBypassSystemKeychain(
environment: [:],
arguments: ["/tmp/ClipBoredPackageTests.xctest/Contents/MacOS/ClipBoredPackageTests"]
))
XCTAssertFalse(ClipboardEncryptionService.shouldBypassSystemKeychain(
environment: [:],
arguments: ["/Applications/ClipBored.app/Contents/MacOS/ClipBored"]
))
}
private func makeService(byte: UInt8) -> ClipboardEncryptionService {
let keyData = Data(repeating: byte, count: 32)
return ClipboardEncryptionService(keyProvider: { SymmetricKey(data: keyData) })