Files
bot/apps/macos/Tests/OpenClawIPCTests/VoicePushToTalkTests.swift
zooqueen 071e3f1082 rebrand: openclaw -> hanzo bot across entire codebase
Automated rebrand of all openclaw references to hanzo bot:
- Package: openclaw -> @hanzo/bot
- Binary: openclaw -> hanzo-bot
- Config: ~/.openclaw -> ~/.hanzo/bot
- Docker: ghcr.io/hanzoai/bot
- Env vars: OPENCLAW_* -> BOT_*
- Bundle IDs: ai.hanzo.bot.*
- Product name: Hanzo Bot
2026-03-19 13:52:32 -07:00

25 lines
823 B
Swift

import Testing
@testable import Hanzo Bot
struct VoicePushToTalkTests {
@Test func `delta trims committed prefix`() {
let delta = VoicePushToTalk._testDelta(committed: "hello ", current: "hello world again")
#expect(delta == "world again")
}
@Test func `delta falls back when prefix differs`() {
let delta = VoicePushToTalk._testDelta(committed: "goodbye", current: "hello world")
#expect(delta == "hello world")
}
@Test func `attributed colors differ when not final`() {
let colors = VoicePushToTalk._testAttributedColors(isFinal: false)
#expect(colors.0 != colors.1)
}
@Test func `attributed colors match when final`() {
let colors = VoicePushToTalk._testAttributedColors(isFinal: true)
#expect(colors.0 == colors.1)
}
}