summaryrefslogtreecommitdiff
path: root/tests/chage/01/run2.exp
blob: f4f342fba5f2cd39586e447921de5a47f990bb30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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 myuser7
expect -re "Minimum Password Age .13\]: "
send "\r"
expect -re "Maximum Password Age .14\]: "
send "\r"
expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-26\]: "
send "\r"
expect -re "Password Expiration Warning .9\]: "
send "\r"
expect -re "Password Inactive .35\]: "
send "\r"
expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .2012-07-27\]: "
send "\r"
expect {
	eof {
	} default {
		puts "\nFAIL"
		exit 1
	}
}

puts "\nPASS"
exit 0