main: add test for setting flags