Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-expect compatibility with Windows #10

Open
singhrasster opened this issue Dec 14, 2018 · 2 comments · May be fixed by #16
Open

go-expect compatibility with Windows #10

singhrasster opened this issue Dec 14, 2018 · 2 comments · May be fixed by #16

Comments

@singhrasster
Copy link

It looks like this library is compatible with only Linux? Is it possible to make it compatible with Windows? Would that require lot of work or it would be something simple? Any pointers you could provide?

@hinshun
Copy link
Contributor

hinshun commented Jan 14, 2019

Hi @singhrasster, sorry only seeing this now. I personally don't use or have a need for Windows hence why it doesn't support it, but I'd be happy to review any PRs if you want to investigate how to provide Windows compatibility.

From what I know, the main blocker is that Windows doesn't have pseudo-terminals. A possible lead is https://github.com/mintty/mintty project, so if you can figure out how to provide a generic interface to create ptys across Windows / Linux / OSX and contribute it to https://github.com/kr/pty we can have support for Windows.

@mdrohmann
Copy link

mdrohmann commented May 19, 2020

Hi and thanks for Netflix/go-expect. We are successfully using this project at ActiveState and have developed a solution around it, so we can test Windows command-line applications.

We created a separate repository https://github.com/ActiveState/termtest, which at its core uses the Netflix/go-expect library, but on Windows uses the ConPTY pseudo-terminal and funnels all its output to a virtual terminal emulator. We found the latter to be necessary as the Windows console injects a lot of control characters, that make it otherwise difficult to match expected strings. If you are interested to add Windows compatibility to the Netflix/go-expect project, please let us know if we can advise or help. I have thought about making a PR back to this project, but it seems difficult now, as we introduced a lot of dependencies by now, and changed the library in significant parts for our purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants