This patch adds 7 test cases. Also the Makefile is changed so as to avoid pread invalid argument error.
 Committer: Jidong Xiao <jidong.xiao@gmail.com>