main: add basic functional test

wait on #1315 
no strong feelings about it.. will change