mirror of
https://github.com/hanzoai/bot.git
synced 2026-11-01 07:38:30 +00:00
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
27 lines
829 B
Swift
27 lines
829 B
Swift
import Hanzo BotKit
|
|
import Testing
|
|
|
|
@Suite struct BonjourEscapesTests {
|
|
@Test func decodePassThrough() {
|
|
#expect(BonjourEscapes.decode("hello") == "hello")
|
|
#expect(BonjourEscapes.decode("") == "")
|
|
}
|
|
|
|
@Test func decodeSpaces() {
|
|
#expect(BonjourEscapes.decode("Hanzo Bot\\032Gateway") == "Hanzo Bot Gateway")
|
|
}
|
|
|
|
@Test func decodeMultipleEscapes() {
|
|
#expect(BonjourEscapes.decode("A\\038B\\047C\\032D") == "A&B/C D")
|
|
}
|
|
|
|
@Test func decodeIgnoresInvalidEscapeSequences() {
|
|
#expect(BonjourEscapes.decode("Hello\\03World") == "Hello\\03World")
|
|
#expect(BonjourEscapes.decode("Hello\\XYZWorld") == "Hello\\XYZWorld")
|
|
}
|
|
|
|
@Test func decodeUsesDecimalUnicodeScalarValue() {
|
|
#expect(BonjourEscapes.decode("Hello\\065World") == "HelloAWorld")
|
|
}
|
|
}
|