chore: Sprachmittler OpenCode starter kit

This commit is contained in:
schihei committed 2026-11-26 11:59:38 +01:00
commit 374085ec2f
94 files changed
+4563

No files matched your search

@@ -0,0 +1,28 @@
import Foundation
import Testing
@testable import SprachmittlerOllama
@Test func moduleLinks() {
#expect(SprachmittlerOllamaModule.moduleName == "SprachmittlerOllama")
}
/// T1.1: the recorded Ollama fixtures are bundled with the test target.
@Test func recordedFixturesAreBundled() throws {
let base = try #require(Bundle.module.resourceURL).appendingPathComponent("Fixtures")
let names = ["version.json", "tags.json", "capture-meta.json"]
for name in names {
let url = base.appendingPathComponent(name)
#expect(FileManager.default.fileExists(atPath: url.path), "missing fixture \(name)")
}
let chats = try FileManager.default.contentsOfDirectory(atPath: base.path)
.filter { $0.hasPrefix("chat-") && $0.hasSuffix(".ndjson") }
#expect(!chats.isEmpty)
}
@Test func recordedVersionIsDecodable() throws {
let base = try #require(Bundle.module.resourceURL).appendingPathComponent("Fixtures")
let data = try Data(contentsOf: base.appendingPathComponent("version.json"))
let object = try #require(try JSONSerialization.jsonObject(with: data) as? [String: Any])
let version = try #require(object["version"] as? String)
#expect(!version.isEmpty)
}