add tests for bug #528,526

http://mrccodereview.cloudapp.net/ui#review:id=1235