diff options
Diffstat (limited to 'tests/chage/34_chage_interractive-W_invalid2/run.exp')
-rwxr-xr-x | tests/chage/34_chage_interractive-W_invalid2/run.exp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/chage/34_chage_interractive-W_invalid2/run.exp b/tests/chage/34_chage_interractive-W_invalid2/run.exp new file mode 100755 index 0000000..04b6f57 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "0\r" +expect -re "Password Expiration Warning .7\]: " +send -- "-2\r" +#expect -re "Password Inactive .-1\]: " +#send "35\r" +#expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +#send "0\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + |