google / goexpect

Expect for Go
BSD 3-Clause "New" or "Revised" License
759 stars 134 forks source link

Return the unmatched suffix back to the buffer so that it can be match again #35

Closed cshung closed 5 years ago

cshung commented 5 years ago

This is intended to fix issue #27

cshung commented 5 years ago

In this iteration, I fixed the obvious stuff. Now I know go use casing to determine exports. For non-export functions, it appears to me that the existing convention is to not comment them, so I simply deleted the comment.

Also tests are needed.

I will try to add one - so expect a new iteration that comes with test, pun intended. :)

cshung commented 5 years ago

@skalle Modified the ExpectTest to do two expect calls in a row to make sure we don't consume the whole buffer after the first expect call.

cshung commented 5 years ago

@skalle

cshung commented 5 years ago

@skalle

skalle commented 5 years ago

Hey Andrew.

One last thing , could you add an Option to enable/disable this behaviour. Might be workflows out there relying on the current way it's done.

skalle commented 5 years ago

Hey. Sorry again for the slow replies.

Thx. a lot for fixing this, making go Expect better for everyone.