add test case for #1006,#1007,#1008

add test case for #1008