Test cases for issue 1057

Issues 1057 covers spaces before and after the :substitute command.
This looks to have been addressed by an earlier check-in.  This change
addes several test cases to make sure that it doesn't regress

closes #1057
Minor code refactor