'If the server responds to a I{BODY[TEXT]} request with a I{FETCH} line
which is truncated after the I{BODY[TEXT]} tokens, the L{Deferred}
returned by L{IMAP4Client.fetchUID} fails with
L{IllegalServerResponse}.'

def test_incompleteFetchSpecificTextResponse(self):

    d = self.client.fetchSpecific('8', headerType='TEXT')
    self.assertEqual(self.transport.value(), '0001    FETCH    8    BODY[TEXT]\r\n')
    self.client.lineReceived('*    8    FETCH    (BODY[TEXT])')
    self.client.lineReceived('0001    OK    FETCH    completed')
    self.assertRaises(imap4.IllegalServerResponse, self._extractDeferredResult, d)
