tests/generic: Check for a literal match

I *think* this might sometimes (on CI) be eating the prompt, so that the actual `prompt`
part of `expect_prompt` doesn't find anything.

On Github Actions we see things like:

```
Testing file pexpects/generic.py ... Failed to match pattern: prompt 5
generic.py:35: timeout from expect_prompt("echo .history.*")

[...]

OUTPUT      +1.08 ms (Line 31): \rprompt 4>
 INPUT      +0.35 ms (Line 34): echo $history[1]\n
OUTPUT      +1.58 ms (Line 35): echo $history[1]\r\necho $history[1]\r\n⏎                                                                              \r⏎ \r\rprompt 5>
```

so the prompt *is* printed, it's just not correctly matched.
This commit is contained in:
Fabian Homborg 2020-11-13 15:20:37 +01:00
parent 5e91e5127d
commit e6cdd315d1

View file

@ -32,7 +32,7 @@ expect_prompt("echo stuff")
# last history command should be the one that printed the history
sendline("echo $history[1]")
expect_prompt("echo .history.*")
expect_prompt("echo \$history\[1\]")
# Backslashes at end of comments (#1255)
# This backslash should NOT cause the line to continue