Mangle expections to avoid matching line twice

After a succesful match mangle the matched expectation to avoid
a second match.  This allows you to match the same string multiple times
 with different responses.

From pexpect docs:
    expect(self, pattern, timeout=-1, searchwindowsize=None)

    If you pass a list of patterns and more than one matches, the first
    match
    in the stream is chosen. If more than one pattern matches at that point,
    the leftmost in the pattern list is chosen. For example::

        # the input is 'foobar'
        index = p.expect (['bar', 'foo', 'foobar'])
        # returns 1 ('foo') even though 'foobar' is a "better" match
Mangle expections to avoid matching line twice

After a succesful match mangle the matched expectation to avoid
a second match.  This allows you to match the same string multiple times
 with different responses.

From pexpect docs:
    expect(self, pattern, timeout=-1, searchwindowsize=None)

    If you pass a list of patterns and more than one matches, the first
    match
    in the stream is chosen. If more than one pattern matches at that point,
    the leftmost in the pattern list is chosen. For example::

        # the input is 'foobar'
        index = p.expect (['bar', 'foo', 'foobar'])
        # returns 1 ('foo') even though 'foobar' is a "better" match
Merge pull request #24 from robertcarr/mangle_expect

Mangle expections to avoid matching line twice