Add a test case for gh-391

Check that commit/rollback works.
Put statements on a single line, so that there is no implicit yield.