'L{twisted.internet.stdio} test.'

def test_stdio(self):

    scriptPath = 'twisted.test.process_twisted'
    p = Accumulator()
    d = p.endedDeferred = defer.Deferred()
    reactor.spawnProcess(p, pyExe, [pyExe, '-u', '-m', scriptPath], env=properEnv, path=None, usePTY=self.usePTY)
    p.transport.write('hello,    world')
    p.transport.write('abc')
    p.transport.write('123')
    p.transport.closeStdin()
    def processEnded(ign):
        self.assertEqual(p.outF.getvalue(), 'hello,    worldabc123', ('Output    follows:\n%s\nError    message    from    process_twisted    follows:\n%s\n' % (p.outF.getvalue(), p.errF.getvalue())))
    return d.addCallback(processEnded)
