Add tests from the old svn tree
We're losing the svn history (which we could probably keep if we tried hard enough) but don't consider that worthwhile. Note these tests are destructive, so run them only in a throwaway environment like a chroot, container, or vm. The tests/run.all script should be the one which launches all the tests. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
26
tests/log/faillog/50_faillog-m-a-u_range_open/login.exp
Executable file
26
tests/log/faillog/50_faillog-m-a-u_range_open/login.exp
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/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}
|
||||
|
||||
set timeout 5
|
||||
expect_after default {puts "\nFAIL"; exit 1}
|
||||
|
||||
spawn /bin/bash
|
||||
expect "# "
|
||||
|
||||
send "login $user\r"
|
||||
expect "Password: "
|
||||
sleep 0.1
|
||||
send "badpass\r"
|
||||
send_user "\n# password 'badpass' sent\n\n"
|
||||
expect "login: "
|
||||
|
||||
send "exit\r"
|
||||
exit 0
|
||||
Reference in New Issue
Block a user