Implement regression test for stdin attach