Merge pull request #31 from DarkDimius/tests

Infrastructure for per-phase tests, with inline source as a string.