diff --git a/tests/p_passwd/_password_complexity.expect b/tests/p_passwd/_password_complexity.expect index d0babe4..abd65ad 100755 --- a/tests/p_passwd/_password_complexity.expect +++ b/tests/p_passwd/_password_complexity.expect @@ -7,7 +7,7 @@ set timeout 10 match_max 6000 spawn su passtest -c passwd -expect "UNIX password:" { send -- "passtest\r" } +expect -re "(UNIX|Current) password:" { send -- "passtest\r" } expect { "password:" { send "$testpassword\r" diff --git a/tests/p_passwd/_user_password.expect b/tests/p_passwd/_user_password.expect index 04a78c2..4629858 100755 --- a/tests/p_passwd/_user_password.expect +++ b/tests/p_passwd/_user_password.expect @@ -1,10 +1,10 @@ -#!/usr/bin/expect -f +#!/usr/bin/expect -d # Author: Iain Douglas set timeout 10 match_max 6000 spawn su passtest -c passwd -expect "UNIX password:" { send -- "passtest\r" } +expect -re "(UNIX|Current) password:" { send -- "passtest\r" } expect { "You must wait longer to change your password" {