Test Other Clauses of start_shell

start_shell() is called by exec, so test those cases as well.

Also add support for passing a fun to exec.