From 741c1ef7a4f2ac316ad6e557ddbe03023413478d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:22:06 +0200 Subject: Adding upstream version 1:4.5. Signed-off-by: Daniel Baumann --- tests/chage/01/run1.exp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 tests/chage/01/run1.exp (limited to 'tests/chage/01/run1.exp') diff --git a/tests/chage/01/run1.exp b/tests/chage/01/run1.exp new file mode 100755 index 0000000..0160fb1 --- /dev/null +++ b/tests/chage/01/run1.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 myuser7 +expect -re "Minimum Password Age .11\]: " +send "13\r" +expect -re "Maximum Password Age .12\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2030-03-02\]: " +send "2005-07-26\r" +expect -re "Password Expiration Warning .4\]: " +send "9\r" +expect -re "Password Inactive .10\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .1979-11-24\]: " +send "2012-07-27\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + -- cgit v1.2.3