chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:22:33 +08:00
commit fc4fcbab58
1848 changed files with 472303 additions and 0 deletions
@@ -0,0 +1,29 @@
import CodexBarCore
import Foundation
import Testing
@Suite
struct CostUsageScanExecutorLinuxTests {
@Test
func returnsWorkValue() async throws {
let value = try await CostUsageScanExecutor.run { _ in 42 }
#expect(value == 42)
}
@Test
func cancelledTaskThrowsCancellationError() async {
let task = Task {
try await CostUsageScanExecutor.run { checkCancellation in
while true {
try checkCancellation()
Thread.sleep(forTimeInterval: 0.005)
}
}
}
task.cancel()
await #expect(throws: CancellationError.self) {
try await task.value
}
}
}