More tests, fix edge return-rewrite case
1.0.1