Tests for the wrap_result functionality.

As requested, tests for the wrap_result feature, please tell me if you consider this adequate coverage.

I've been using the new feature in my project, and it is working out great so far!