Comments (7)
For those following along at home, I have created a branch - "childprocess" - for implementing integration tests in rb-readline. I've not managed to get this working under Windows yet (although this should be possible, since ChildProcess is a platform independent process control library).
from rb-readline.
the kicker is rb-readline doesn't appear to have a comprehensive test suite
I was able to get some automation test working on it in windows by setting
$rb_readline_use_file_io_on_windows = true
before requiring it, in windows ( so that it would use read/write-able file handles ), I...think that would be good enough for windows' tests, as otherwise it calls straight into the windows api to read from the keyboard, so I suppose you could simulate it with windows API calls: https://github.com/ffi/ffi/wiki/Windows-Examples
that might work too.
from rb-readline.
Hi rdp!
I've looked around, but can't see anything about $rb_readline_use_file_io_on_windows
(other than in your repo - but it doesn't appear to do anything there).
We're hoping to create a test suite using ChildProcess[1], a platform independent abstraction layer for manipulating forked processes.
1 - https://github.com/jarib/childprocess
from rb-readline.
it's only in my repo, and on a line that raises an exception, which causes rb-readline to default to File based I/O (that's how it's used).
If you can get it working some other way that's cool, too, though may be difficult because it calls directly into msvcrt's _getch which is not pipable, that I'm aware.
Luis has some background on how mingw rubys at times hangs etc. when trying to redirect stdout, stderr, etc.
Good luck!
-r
from rb-readline.
In #66, @luislavena wrote:
Perhaps we can abstract reading from terminal into vt100 compatible
adapters and build a simple adapter for testing, so reading from it would
be more easy.
from rb-readline.
@luislavena I've been using a Windows XP VM for testing rb-readline. Do you know if there are any functional differences I should be aware of in later versions of Windows? Will Windows 8 change things from a Ruby developer point of view?
from rb-readline.
@Spakman as long desktop API I'm aware of, the functionality is the same.
I recommend you test always using cmd.exe as console host process.
from rb-readline.
Related Issues (20)
- IRB and readline with non english keyboards on Windows HOT 1
- Alt+. crashes in `_extract_last_quote` when last line is empty
- Already initialized constant warnings under Ruby 2.3.1 HOT 4
- new release HOT 4
- VI in Rails Console HOT 2
- rb-readline (0.5.3) crashes on mac_os_x / 2.3.1p112 HOT 1
- "\r" being displayed after hitting enter in rb-readline on Arch HOT 2
- Invalid byte sequence in UTF-8 when running console HOT 5
- issue deploying rails 5 application to AWS using Elastic Beanstalk due to rb-readline HOT 5
- RbReadline.rl_insert_text can not insert Chinese characters
- Officially support JRuby HOT 2
- ArgumentError when case insensitive matching is active HOT 1
- Add support for Readline.vi_editing_mode? & Readline.emacs_editing_mode? HOT 1
- Tests are randomly failing
- Using rb-readline in Windows with cygwin/mintty/git for Windows doesn't work
- Rb-readline causes the rails console to use the keyboard "↑" after typing Chinese and cannot load Chinese
- Fails when $TERM=xterm HOT 4
- Broken support for special prefixes HOT 1
- `Readline::HISTORY.delete_at(index)` not working for indices of negative values
- Encoding::UndefinedConversionError for UTF-8 to ASCII8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rb-readline.