add test case & rewrite travis script