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

Some command tests fail with Highline 1.6.9 under JRuby #17

Open
rsutphin opened this issue Dec 28, 2011 · 4 comments
Open

Some command tests fail with Highline 1.6.9 under JRuby #17

rsutphin opened this issue Dec 28, 2011 · 4 comments
Labels

Comments

@rsutphin
Copy link
Contributor

Three of the CLI specs fail using HighLine 1.6.9 under JRuby 1.6.5. There's a note about switching to JLine in the HL changelog; that might be the culprit. I'm not sure if the issue actually affects the CLI or just the tests.

@rsutphin
Copy link
Contributor Author

Failures continue on HighLine 1.6.15 with JRuby 1.7.3. There are actually 5 failures with this combination. All of them seem to be related to stdin/stdout/stderr overrides in the test suite.

@rsutphin
Copy link
Contributor Author

It is related to the use of JLine in HighLine 1.6.9 and later. There are two problems:

  1. JLine does not read partial lines. The stdin simulator in the spec suite does not append a trailing newline, so with HighLine/JLine the specs were seeing different input than expected.

  2. More seriously, the way JLine was integrated into HighLine does not respect the input and output streams passed into HighLine.new. I have submitted a PR for this (Use the configured streams on JRuby with JLine JEG2/highline#67).

The second one means that this does affect the CLI in real life (it wants to output prompts to standard error, while the hard-coded stream in the JLine integration is standard out), so the solution of locking to a pre-1.6.9 version of HighLine until HighLine is fixed is correct.

@rsutphin
Copy link
Contributor Author

rsutphin commented Jul 4, 2014

Closed by #23.

@rsutphin rsutphin closed this as completed Jul 4, 2014
@rsutphin
Copy link
Contributor Author

rsutphin commented Jul 4, 2014

Actually, even with the changes outlined in my comments above, there are still several test failures with later highline versions on JRuby.

@rsutphin rsutphin reopened this Jul 4, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant