'Standard call to C{mail.alias.ProcessAlias}: check that the specified
script is called, and that the input is correctly transferred to it.'

def test_processAlias(self):

    sh = FilePath(self.mktemp())
    sh.setContent('#!/bin/sh\nrm    -f    process.alias.out\nwhile    read    i;    do\n                echo    $i    >>    process.alias.out\ndone')
    os.chmod(sh.path, 448)
    a = mail.alias.ProcessAlias(sh.path, None, None)
    m = a.createMessageReceiver()
    for l in self.lines:
        m.lineReceived(l)
    def _cbProcessAlias(ignored):
        with open('process.alias.out') as f:
            lines = f.readlines()
        self.assertEqual([L[:(-1)] for L in lines], self.lines)
    return m.eomReceived().addCallback(_cbProcessAlias)
