Add basic functional test to self-test suite.
Merge branch 'master' into geezer