Closed wolf-li closed 2 years ago
@wolf-li
Thank you for reporting.
Would you append CRLF at the last line of sample.lua ?
On my environment, when I remove CRLF from the last line of the script, I see the error message you reported.
@hymkor
Thank you very much for your reply. I tried the method you said, but it didn't work. As shown in the figure below .
Using expect-v0.6.0-amd64.zip and v0.5, It's the same problem.
@wolf-li :
When you edit the script by Visual Studio Code, it is possible that the last line does not have CRLF.
To resolve this problem , two methods exist.
end
.Would you try one of these methods ?
@wolf-li :
When you edit the script by Visual Studio Code, it is possible that the last line does not have CRLF.
To resolve this problem , two methods exist.
- Append the empty line after
end
.- Try the new version: Release v0.6.1 · hymkor/expect. where I fixed the bug that When a script did not end with CRLF, the last line was ignored.
Would you try one of these methods ?
Good job, All of these solutions can solve the problem. But I recommend using the second method. If the script is written incorrectly, the session will not get stuck as shown in the figure below.
Many thanks to the author for his work.
I'm glad the problem is solved .
Can I close this issue ?
Yes. Thanks for your work.
Hi, guys: I get a error message when I run the example. Could anyone know that?
sample.lua
terrmial shows error message: sample.lua at EOF: syntax error