VoiceWake: add escaping regression tests

This commit is contained in:
Peter Steinberger committed 2025-12-07 19:01:14 +01:00
1 parent b3f79e5b02
commit fb2a7d8cd1
2 files changed
+13 -1

No files matched your search

@@ -63,4 +63,14 @@ import Testing
#expect(!command.contains("/tmp/custom-cli"))
}
@Test func shellEscapeHandlesQuotesAndParens() {
let text = "Debug test works (and a funny pun)"
let escaped = VoiceWakeForwarder.shellEscape(text)
#expect(escaped == "'Debug test works (and a funny pun)'")
let textWithQuote = "Debug test works (and a funny pun)'"
let escapedQuote = VoiceWakeForwarder.shellEscape(textWithQuote)
#expect(escapedQuote == "'Debug test works (and a funny pun)'\\'''")
}
}