From 83c5c51b58162c017d791999aa063c014eb37f62 Mon Sep 17 00:00:00 2001 From: Timothy J Warren Date: Thu, 5 Dec 2019 14:54:25 -0500 Subject: [PATCH] Actually add the test... --- tests/ANSITest.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/ANSITest.php diff --git a/tests/ANSITest.php b/tests/ANSITest.php new file mode 100644 index 0000000..b4f7fe7 --- /dev/null +++ b/tests/ANSITest.php @@ -0,0 +1,34 @@ +assertEquals("\e[44m", ANSI::color(Color::BG_BLUE)); + } + + public function testRgbColor(): void + { + $this->assertEquals("\e[38;2;128;128;128m", ANSI::rgbColor(128, 128, 128)); + } + + public function testMoveCursor(): void + { + $this->assertEquals("\e[25;40H", ANSI::moveCursor(25, 40)); + } + + public function testScrollUp(): void + { + $this->assertEquals("\e[5S", ANSI::scrollUp(5)); + } + + public function testScrollDown(): void + { + $this->assertEquals("\e[5T", ANSI::scrollDown(5)); + } +} \ No newline at end of file