add instructions for writing and executing tests
formatting cleanups

- change $> command prefix to $
- clean out trailing whitespace
- cross link to new testing section