add test case for #1008
add test case for #1006
add test case for #1007
Merge pull request #1009 from bronze1man/pr-test1

Test cases for #1006 #1007 #1008