REF: put main-related tests into functional test suite.