add test cases for issues 10497 and 10793

http://d.puremagic.com/issues/show_bug.cgi?id=10497
http://d.puremagic.com/issues/show_bug.cgi?id=10793