add test for #3940