added tests for expect and expect_regex