Fix #9103, implementing `cd -` in REPL shell mode

use `@test`, not `@assert` here