Add tests from the old svn tree

We're losing the svn history (which we could probably keep if we tried
hard enough) but don't consider that worthwhile.

Note these tests are destructive, so run them only in a throwaway
environment like a chroot, container, or vm.

The tests/run.all script should be the one which launches all the tests.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Serge Hallyn
2014-09-17 14:42:55 -05:00
parent 2cb54158b8
commit b999d48941
8970 changed files with 336314 additions and 0 deletions

31
tests/chage/01/run2.exp Executable file
View File

@@ -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 .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