Add some tests.
Merge pull request #984 from normanjaeckel/MainTests

Add some tests.