summaryrefslogtreecommitdiff
path: root/tests/log/lastlog/17_lastlog-t/login.exp
blob: a005233435135037205471154b086c3473bf4377 (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 "\nFAIL"; exit 1}

spawn /bin/bash
expect "# "

send "login -p -f $user\r"
expect "$ "

send "exit\r"
exit 0