Add test for issue #777
http://hub.qgis.org/issues/777