Add tests for oneshot (and fix bugs revealed).