summaryrefslogtreecommitdiff
path: root/tests/chage/38_chage_interractive-I-1/run.exp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chage/38_chage_interractive-I-1/run.exp')
-rwxr-xr-xtests/chage/38_chage_interractive-I-1/run.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/chage/38_chage_interractive-I-1/run.exp b/tests/chage/38_chage_interractive-I-1/run.exp
new file mode 100755
index 00000000..94eb4630
--- /dev/null
+++ b/tests/chage/38_chage_interractive-I-1/run.exp
@@ -0,0 +1,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 myuser1
+expect -re "Minimum Password Age .0\]: "
+send "\r"
+expect -re "Maximum Password Age .99999\]: "
+send "\r"
+expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: "
+send "\r"
+expect -re "Password Expiration Warning .7\]: "
+send "\r"
+expect -re "Password Inactive .3\]: "
+send -- "-1\r"
+expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: "
+send "\r"
+expect {
+ eof {
+ } default {
+ puts "\nFAIL"
+ exit 1
+ }
+}
+
+puts "\nPASS"
+exit 0
+