test-unit support

Hacked together, but working.