Check for final prompt in pagination

This commit is contained in:
Philip Prindeville 2023-12-01 17:12:19 -07:00 committed by Olof Hagsand
parent 4d91ce0995
commit d76adf51d2

View file

@ -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