Enable Travis CI and add a few test cases.