added test code and fixed one bug
Merge branch 'master' of https://github.com/7i/base