// retoor <retoor@molodetz.nl>
import "subprocess" for Popen
var p = Popen.new(["sh"], true)
System.print(p.pid > 0) // expect: true
p.stdin.write("echo pty_test\n")
p.stdin.write("exit\n")
var out = p.stdout.read()
System.print(out.contains("pty_test")) // expect: true
System.print(p.wait()) // expect: 0