diff --git a/tests/Unit/File/ANSITest.php b/tests/Unit/File/ANSITest.php index 373504d1..3f6e607e 100644 --- a/tests/Unit/File/ANSITest.php +++ b/tests/Unit/File/ANSITest.php @@ -28,4 +28,20 @@ class Unit_File_ANSITest extends PhpseclibTestCase $this->assertSame($ansi->getScreen(), $expected); } + + public function testCaseJ() + { + $str = "\x1B[H"; // Move cursor to upper left corner + $str.= "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; + $str.= "\x1B[H"; // Move cursor to upper left corner + $str.= "\x1B[J"; // Clear screen from cursor down + + $ansi = new ANSI(); + $ansi->appendString($str); + + $expected = '
';
+        $expected.= '
'; + + $this->assertSame($ansi->getScreen(), $expected); + } }