--- ttyin.c.ORG	2024-07-31 08:50:27.799651092 -0400
+++ ttyin.c	2024-07-31 09:09:06.835828511 -0400
@@ -69,7 +69,11 @@
 	int fd = -1;
 #if LESSTEST
 	if (is_lesstest())
+	{
 		fd = open_tty_device(ttyin_name);
+		if (fd < 0)
+			fd = 0; /* assume lesstest uses stdin */
+	}
 #endif /*LESSTEST*/
 #if HAVE_TTYNAME
 	if (fd < 0)
