shadow/tests/log/lastlog/17_lastlog-t/login.exp
Serge Hallyn 8728bd87ed tests: print default timeout message to stderr
Signed-off-by: Serge Hallyn <serge@hallyn.com>
2023-02-09 09:55:04 -06:00

20 lines
271 B
Plaintext
Executable File

#!/usr/bin/expect
if {$argc == 1} {
set user [lindex $argv 0]
} else {
set user "foo"
}
set timeout 2
expect_after default {puts stderr "\nFAIL"; exit 1}
spawn /bin/bash
expect "# "
send "login -p -f $user\r"
expect "$ "
send "exit\r"
exit 0