An expect(1) clone that doesn't corrupt CR bytes. https://code.ivysaur.me/mini-expect
This repository has been archived on 2020-05-03. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2015-12-03 10:24:02 +00:00
dist-archive commit all archived files 2015-12-03 10:24:02 +00:00
.legacy-codesite.toml initial meta commit 2015-12-03 10:24:02 +00:00
README.md commit all archived files 2015-12-03 10:24:02 +00:00

mini-expect

An expect(1) clone that doesn't corrupt CR bytes.

I recently attempted to use expect(1) as part of a test suite, but it seems totally incapable of sending 0x13 bytes without corrupting them into 0x10. Maybe it was my terminal mode (but echo $'\r' | nc was fine), maybe it was my expect/tcl installation (but the bug was observed on current packages from both Cygwin and Debian), maybe it was easier to reimplement the basic functionality instead of spending any more time on that.

Usage

source mini-expect.sh

Then, use spawn/send/expect/interact commands just like with expect(1).

Download