From d76adf51d262e90cb66793b78a5bfe79aaf037ae Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Fri, 1 Dec 2023 17:12:19 -0700 Subject: [PATCH] Check for final prompt in pagination --- test/test_pagination_expect.exp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_pagination_expect.exp b/test/test_pagination_expect.exp index e8fb1fbf..1720cc5a 100755 --- a/test/test_pagination_expect.exp +++ b/test/test_pagination_expect.exp @@ -22,6 +22,8 @@ set xpath [lindex $argv 1] set line1 [lindex $argv 2] set line2 [lindex $argv 3] +set prompt "$::env(USER)@[info hostname] />" + set timeout 15 spawn {*}$clixon_cli -f $cfg @@ -61,6 +63,11 @@ expect { -ex "--More--" { send_user "\nMore not expected.\n"; exit 1} } +expect { + timeout { send_user "\nFinal prompt not received.\n"; exit 1} + -ex "$prompt " { send_user "\nFinal prompt OK.\n"} +} + send "\d" close