Increase test coverage of commands package
We had an ugly regression in 13.2 - #26609 (closed) - caused by an innocent looking change as part of adding a new linter.
Unfortunately this wasn't caught by any tests because the test coverage in this package is one fo the lowest - 39% at the time of writing this.
For this issue we should do some analysis of what features and flags in the commands
package aren't well covered and add test coverage for them. I don't think it's appropriate to set a target percent at this point because it would be arbitrary - what we should do is list out the areas that have none or weak coverage and improve the tests.