Refactor CLI unit tests

Rename assert.run to assert.compileToWithCmd
Simplify its input & output arguments