textproc & cmd: improve test coverage