Minimal but very flexible implementation of the expect pattern. Signed-off-by: Daniel Dragomir <daniel.dragomir@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>