Skip Menu |

This queue is for tickets about the Win32-Console-ANSI CPAN distribution.

Report information
The Basics
Id: 105260
Status: resolved
Priority: 0/
Queue: Win32-Console-ANSI

People
Owner: jl_morel [...] bribes.org
Requestors: Ralf.Neubauer [...] wido.bv.aok.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.09



Subject: test depend on window size
Date: Tue, 16 Jun 2015 10:52:29 +0000
To: "bug-Win32-Console-ANSI [...] rt.cpan.org" <bug-Win32-Console-ANSI [...] rt.cpan.org>
From: "Neubauer, Ralf" <ralf.neubauer [...] wido.bv.aok.de>
Hi, the following tests failed for me: t/04_DisplayEdition.t (Wstat: 0 Tests: 74 Failed: 74) Failed tests: 1-74 t/05_Colors.t (Wstat: 0 Tests: 36 Failed: 35) Failed tests: 1-35 t/07_TortureMeHoney.t (Wstat: 0 Tests: 3 Failed: 3) Failed tests: 1-3 t/08_Compatibility.t (Wstat: 0 Tests: 3 Failed: 3) Failed tests: 1-3 Analysis shows that they all use SetConsoleSize(80, 25); to set a standard size and compare the result of Win32::Console::ANSI::_ScreenDump() with some shipped result hashes. On my system Win32::Console::ANSI::_ScreenDump() returns 13440 bytes, i.e. 3660 character cells. Apart from that for test 1 of 04_DisplayEdition.pl, which I checked, the content matches the function calls, but there are too many character cells. My CMD consoles are 42 lines high, 80*42 = 3660. SetConsoleSize() obviously failed to set a size below that of the default. Like in the previous bug #105257, 04_DisplayEdition.pl works when I set the _default_ window size to 80x25. Setting the size of the current window makes no difference. My thoughts on fixing this are the same as in #105257, one could: - skip the test if the terminal size is not 80x25 - make it work with different sizes, e.g. clip the result of Win32::Console::ANSI::_ScreenDump() to an 80x25 screen buffer before md5_hex() - maybe open the console used for the tests with a fixed size independent of the user settings. Ralf
RT-Send-CC: Ralf.Neubauer [...] wido.bv.aok.de
Le Mar 16 Juin 2015 06:52:47, Ralf.Neubauer@wido.bv.aok.de a écrit : Show quoted text
> Hi, > > the following tests failed for me: > > t/04_DisplayEdition.t (Wstat: 0 Tests: 74 Failed: 74) > Failed tests: 1-74 > t/05_Colors.t (Wstat: 0 Tests: 36 Failed: 35) > Failed tests: 1-35 > t/07_TortureMeHoney.t (Wstat: 0 Tests: 3 Failed: 3) > Failed tests: 1-3 > t/08_Compatibility.t (Wstat: 0 Tests: 3 Failed: 3) > Failed tests: 1-3 > > > Analysis shows that they all use > > SetConsoleSize(80, 25); > > to set a standard size and compare the result of > Win32::Console::ANSI::_ScreenDump() with some shipped result hashes. > > On my system Win32::Console::ANSI::_ScreenDump() returns 13440 bytes, > i.e. 3660 character cells. Apart from that for test 1 of > 04_DisplayEdition.pl, which I checked, the content matches the > function calls, but there are too many character cells. My CMD > consoles are 42 lines high, 80*42 = 3660. SetConsoleSize() obviously > failed to set a size below that of the default. > > Like in the previous bug #105257, 04_DisplayEdition.pl works when I > set the _default_ window size to 80x25. Setting the size of the > current window makes no difference. > > > My thoughts on fixing this are the same as in #105257, one could: > - skip the test if the terminal size is not 80x25 > - make it work with different sizes, e.g. clip the result of > Win32::Console::ANSI::_ScreenDump() to an 80x25 screen buffer before > md5_hex() > - maybe open the console used for the tests with a fixed size > independent of the user settings. > > Ralf
Hi, Thank you for reporting this bug. In version 1.09, I added a private function to put the console in a "standard state" before each test. It fixes the bug for me. Can you confirm that? J-L
Subject: RE: [rt.cpan.org #105260] test depend on window size
Date: Fri, 24 Jul 2015 14:24:23 +0000
To: "bug-Win32-Console-ANSI [...] rt.cpan.org" <bug-Win32-Console-ANSI [...] rt.cpan.org>
From: "Neubauer, Ralf" <ralf.neubauer [...] wido.bv.aok.de>
Hi Jean-Louis, Show quoted text
> -----Original Message----- > From: Jean-Louis Morel via RT [mailto:bug-Win32-Console-ANSI@rt.cpan.org] > > In version 1.09, I added a private function to put the console in a "standard state" before each test. It fixes the bug > for me. Can you confirm that?
Yes, I can confirm that, the tests work now and I get "All tests successful.". Many thanks! Ralf
RT-Send-CC: Ralf.Neubauer [...] wido.bv.aok.de
Thank you for confirmation. I close the ticket.