GithubHelp home page GithubHelp logo

Comments (7)

Spakman avatar Spakman commented on July 18, 2024

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.

rdp avatar rdp commented on July 18, 2024

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.

Spakman avatar Spakman commented on July 18, 2024

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.

rdp avatar rdp commented on July 18, 2024

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.

Spakman avatar Spakman commented on July 18, 2024

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.

Spakman avatar Spakman commented on July 18, 2024

@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.

luislavena avatar luislavena commented on July 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.