Shell tool testing

Sometimes when I’m writing a Kakoune plugin, I decide I need an external helper tool for Kakoune to call, and I want to write tests for it. If I write it in Python, I can use the standard library’s unittest module, but if I’m writing in shell or AWK or something, the path is not as clear.

I recently discovered a tool called prove and used it for testing basic shell interactions (input, output, exit codes, etc.) and I wrote a blog post about what I learned:

https://zork.net/~st/jottings/shell-tool-testing.html

5 Likes

Nice.

also related:

1 Like