Public bug reported:
public function testCase1()
{
$str = "\x1B[07m"; // turn reverse video on
$str.= "aaaaaaaaaaaaaaaaaa";
$str.= "\x1B[10D"; // move cursor left 10 lines
$str.= "\x1B[m"; // reset everything
$str.= "bbb";
$ansi = new File_ANSI();
$ansi->appendString($str);
$expected = '<pre width="80" style="color: white; background: black">';
$expected.= '<span style="color: black"><span style="background:
white">aaaaaaaa';
$expected.= 'bbb';
$expected.= 'aaaaaaa</span></span>';
$expected.= '</pre>';
$this->assertSame($expected, $ansi->getScreen());
}
1) Unit_File_ANSITest::testCase1
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'<pre width="80" style="color: white; background: black"><span style="color:
black"><span style="background: white">aaaaaaaabbbaaaaaaa</span></span></pre>'
+'<pre width="80" style="color: white; background: black"><span style="color:
black"><span style="background: white">aaaaaaaa</span></span>bbb<span
style="color: black"><span style="background:
white">aaaaaaa</span></span></pre>'
/tmp/autopkgtest.C3hxHF/build.X1Y/src/tests/Unit/File/ANSITest.php:29
It's not clear to me why the behavior has changed here; from what I understand
of the test case code it should be displaying a's in black and b's in white,
but the actual output seems to be showing it all in black on white. (Note the
expected/actual indicators in the diff are misleading because the args to
assertSame() should be in the reverse order).
Presumably the new behavior relates to the change to php8 in impish.
The test case passes fine with php7.4.
I'm going to bypass the testcase just to get phpseclib migrated but if
this bug shows up with end users, we should probably restore the
testcase and investigate further.
** Affects: phpseclib (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1932968
Title:
Unit_File_ANSITest::testCase1 fails with php8 when checking ANSI color
code sequences.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/phpseclib/+bug/1932968/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs