Add test suite.

This also documents gh issue #8 with a failing test.