add testcase for issue #239