4 ms·
A good framework to test command line is cram https://bitheap.org/cram/ https://bitheap.org/cram/ You can define in a small test file what is the shell code t
by jaimebuelta 8y ago
A good framework to test command line is cram
https://bitheap.org/cram/ https://bitheap.org/cram/
You can define in a small test file what is the shell code to execute and what is the expected result, including error codes
I like sh very much in Python to generate scripts, but in terms of pure testing shell commands, I think cram is brilliant.
Here is an example on tests for a shell utility I created: https://github.com/jaimebuelta/ffind/tree/master/tests https://github.com/jaimebuelta/ffind/tree/master/tests