Open MSP-Greg opened 5 years ago
Your fork is good for Windows until some progress is made on the official libraries :+1:
Sometime soon, I'll try it with byebug and see how the tests do...
Off topic - JFYI https://bugs.ruby-lang.org/issues/15313
Yesterday morning I ran tests with reline & ruby-head, some issues. Haven't torn thru your code, how do I get typical --verbose test output?
From my perspective, reline should work with byebug...
I think with TESTOPTS=--verbose
?
Yeah, I think it should work too, but when I tried tests wouldn't run. I think it's some problem when shelling out with Open3
and passing user input to the subprocess.
First thing I tried. Dots...
IO.popen, Open3, etc. I've worked plenty with STDOUT & STDERR, but STDIN, no.
I've tried tests from time to time also. Also, I said 'reline should work with byebug'. I really think that reline can only be considered a replacement for readline when it works with byebug...
First thing I tried. Dots...
Try bin/minitest --verbose
(not sure why the other option is not working).
It'd be great to get this working, indeed.
Duh. Looked at the code a bit
rake test --verbose
Back to frozen tests...
I worked a bit with reline using ruby-head, which I think is equivalent to reline master. Tests were intermittent, but sometimes all did pass. Used the following code for reline, most of which came from its test setup:
require 'reline'
Reline.send(:remove_const, :IOGate) if Reline.const_defined?(:IOGate)
Reline.const_set :IOGate, Reline::GeneralIO
Reline.core.config.instance_variable_set :@test_mode, true
Reline.core.config.reset
Reline.core.input = STDIN
Using something similar to the above, CI is passing on Windows using reline. I'm considering this to be on hold until a determination is made as to reline's UI compatibility with Windows.
JFYI,
It was mentioned in Ruby core, another ruby implementation: https://github.com/aycabta/reline
I did test it with the Ruby Core readline tests, and it did fail some tests (missing methods, etc).
I'd help with it, but given that I'm a Windows type, I don't really have a 'baseline' for how readline should work...