add test for cmd line tool.