add test cases from pull #2306