main: add basic functional test

wait on #1315 
What's the real utility of this?