summaryrefslogtreecommitdiffstats
path: root/tests/tests/log/lastlog/04_lastlog_multiple/login.exp
blob: e6a4345f02459d31cf67583d2edd5881b91a831e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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 -f $user\r"
expect "$ "

send "exit\r"
exit 0