add test cases for #2638