From 39f5063c9c78a1755c876a64bbda6555678dcedf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Fri, 9 Feb 2024 02:37:19 -0500
Subject: [PATCH] Add a regression test for bug fixed in previous commit.

---
 xtrn/termtest/termtest.js | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/xtrn/termtest/termtest.js b/xtrn/termtest/termtest.js
index 231b84d610..a5381e0b9c 100644
--- a/xtrn/termtest/termtest.js
+++ b/xtrn/termtest/termtest.js
@@ -1176,6 +1176,17 @@ var tests = [
 		return true;
 		// TODO: Interactive...
 	}},
+	{'name':'Regressions', 'func':function() {
+		// Fixed by 3dfa12a6cac
+		// Deleting lines could move rows that are off the screen
+		// in a box that has a negative height
+		console.clear();
+		console.gotoxy(1, 2);
+		console.write(format("\x1b[2;%dr", console.screen_rows - 1));
+		console.gotoxy(1, 2);
+		console.write(format("\x1b[%dM", console.screen_rows - 1));
+		return true;
+	}},
 ];
 
 function main()
-- 
GitLab