mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-11 13:30:46 +08:00
同时收敛启动与运维脚本默认行为(含 wiki worker)、更新 Admin 可观测性与相关测试,降低首轮时延并提高运行稳定性。 Made-with: Cursor
26 lines
826 B
Swift
26 lines
826 B
Swift
import OpenClawKit
|
|
import Testing
|
|
|
|
@Suite struct BonjourEscapesTests {
|
|
@Test func decodePassThrough() {
|
|
#expect(BonjourEscapes.decode("hello") == "hello")
|
|
#expect(BonjourEscapes.decode("") == "")
|
|
}
|
|
|
|
@Test func decodeSpaces() {
|
|
#expect(BonjourEscapes.decode("OpenClaw\\032Gateway") == "OpenClaw 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")
|
|
}
|
|
}
|