Add test cases for issue #296.