Subject: | cursor tests depend on user settings for CMD |
Date: | Tue, 16 Jun 2015 09:11:42 +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,
some Subtests of t\02_CursorFunc.t and t\03_CursorMove.t failed for me (Windows 7 64bit):
D:\tmp\strawberry-5.20-64\archive\Win32-Console-ANSI-1.08>prove
t\00_Pod.t ............. ok
t\01_PodCoverage.t ..... skipped: Test::Pod::Coverage 1.00 required for testing
POD coverage
t\02_CursorFunc.t ...... Failed 2/39 subtests
t\03_CursorMove.t ...... Failed 6/98 subtests
t\04_DisplayEdition.t .. Failed 74/74 subtests
t\05_Colors.t .......... Failed 35/36 subtests
t\06_Func.t ............ ok
t\07_TortureMeHoney.t .. Failed 3/3 subtests
t\08_Compatibility.t ... Failed 3/3 subtests
t\09_Compatibility2.t .. skipped: Term::ANSIScreen not installed
t\99_Kwalitee.t ........ skipped: Test::Kwalitee not installed; skipping
Test Summary Report
-------------------
t\02_CursorFunc.t (Wstat: 0 Tests: 39 Failed: 2)
Failed tests: 22-23
t\03_CursorMove.t (Wstat: 0 Tests: 98 Failed: 6)
Failed tests: 69, 74, 76, 81, 86, 88
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
Files=11, Tests=276, 2 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU)
Result: FAIL
For t\02_CursorFunc.t these are:
not ok 22
not ok 23
For t\03_CursorMove.t these are:
not ok 69
not ok 74
not ok 76
not ok 81
not ok 86
not ok 88
An example of a failed subtest is:
my ($Xmax, $Ymax) = XYMax();
[...]
# test 22
Cursor(17, 5);
Cursor(17, 1000);
($x, $y) = Cursor();
ok( $x==17 and $y==$Ymax );
To not lose shell history too early, my default setting for the Window Buffer Height is 3000. Obviously this is returned by XYMax() and test 22 tests if 1000 is clipped to the buffer height, which is 3000 and not clipping takes place.
Just changing the buffer height of the current CMD console doesn't help, I had to change the default setting to get:
D:\tmp\strawberry-5.20-64\archive\Win32-Console-ANSI-1.08>prove
t\00_Pod.t ............. ok
t\01_PodCoverage.t ..... skipped: Test::Pod::Coverage 1.00 required for testing
POD coverage
t\02_CursorFunc.t ...... ok
t\03_CursorMove.t ...... ok
t\04_DisplayEdition.t .. Failed 74/74 subtests
t\05_Colors.t .......... Failed 35/36 subtests
t\06_Func.t ............ ok
t\07_TortureMeHoney.t .. Failed 3/3 subtests
t\08_Compatibility.t ... Failed 3/3 subtests
t\09_Compatibility2.t .. skipped: Term::ANSIScreen not installed
t\99_Kwalitee.t ........ skipped: Test::Kwalitee not installed; skipping
Test Summary Report
-------------------
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
Files=11, Tests=276, 2 wallclock secs ( 0.12 usr + 0.03 sys = 0.16 CPU)
Result: FAIL
There are multiple ways to fix this:
- use $Xmax+1 and $Ymax+1 instead of 1200 and 1000 for the clipping tests
- just skip the tests, if $Xmax and $Ymax are too big
- open the console the tests run on with a fixed size, overriding the user settings for the test. If possible.
Ralf