Feature/repl v3 test #648 rebased

#648 have been long left, and it just works. So we'd better merge it than nothing until 1.5.0.