Coder Social home page Coder Social logo

Comments (5)

AlexDaniel avatar AlexDaniel commented on August 27, 2024

Interestingly, it works if I remove endwin line. I don't really understand what's going on there.

from raku-ncurses.

geekosaur avatar geekosaur commented on August 27, 2024

What's going on there is that initscr() sets a flag for terminal init strings to be output on stdout, and endwin() outputs them followed by deinit sequences and a cursor move to the bottom left of the screen. This probably confuses prove, which is looking for test output.

This behavior will have been impacted by the changes to buffer noninteractive output, and the knock-on fix for buffers not being autoflushed when a handle is closed on going out of scope or the program ending.

For the purposes of a test, you either want to arrange for fd 1 to not be the pipe to prove, or you want to use newterm() to have curses write its init/deinit to some other file descriptor.

from raku-ncurses.

geekosaur avatar geekosaur commented on August 27, 2024

Note that, without the endwin call, the init/deinit sequences are not output at all. But on a real terminal, it's possible it would be left in an odd state. (Unlikely though; while curses/XTI compliant libraries are allowed to set things up however they want, in practice ncurses will generally obey crmode() and friends as written and leave the terminal in default mode otherwise.)

from raku-ncurses.

azawawi avatar azawawi commented on August 27, 2024

Sorry for the delay on this one. Bug was fixed in rakudo latest by @AlexDaniel. Please reopen if you think otherwise 👍

from raku-ncurses.

AlexDaniel avatar AlexDaniel commented on August 27, 2024

Well, what changed is that we simply re-disabled output buffering in Test.pm6, this is why it works now. There wasn't really a bug in rakudo, or so it seems. But given that the test is passing I guess there's nothing to do here indeed. @azawawi++

from raku-ncurses.

Related Issues (18)

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.