updated test_stdin to work in SM shell