Splits register_commands into a passing test on Linux (to improve test coverage),
and a failing test for register expressions.

Also factors out common setup code in preparation to add a few new tests.
Reviewed by: Daniel Malea