summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2002-10-19 01:22:31 +0000
committerTom Yu <tlyu@mit.edu>2002-10-19 01:22:31 +0000
commitfcbd19fa1eab345d7ca5a97a2a8d2e63c6e60d26 (patch)
tree38832f37ddb6fd53eba0b22f5bc7d18e5f5f50b8 /src/lib
parent4824c17e6a983c7e1335b500f4bf3e6849af6adf (diff)
downloadkrb5-fcbd19fa1eab345d7ca5a97a2a8d2e63c6e60d26.tar.gz
krb5-fcbd19fa1eab345d7ca5a97a2a8d2e63c6e60d26.tar.xz
krb5-fcbd19fa1eab345d7ca5a97a2a8d2e63c6e60d26.zip
This commit fixes the test suite aspects. Callers of the various
read_password functions still need to be updated. * api.2/init-v2.exp (test106): Make regexp more forgiving of variant password prompts. * api.0/init.exp (test7, test22, test225): Make regexp more forgiving of variant password prompts. ticket: 1217 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14932 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/kadm5/unit-test/ChangeLog8
-rw-r--r--src/lib/kadm5/unit-test/api.0/init.exp6
-rw-r--r--src/lib/kadm5/unit-test/api.2/init-v2.exp5
3 files changed, 14 insertions, 5 deletions
diff --git a/src/lib/kadm5/unit-test/ChangeLog b/src/lib/kadm5/unit-test/ChangeLog
index 660b75ca4..81bfb13f8 100644
--- a/src/lib/kadm5/unit-test/ChangeLog
+++ b/src/lib/kadm5/unit-test/ChangeLog
@@ -1,3 +1,11 @@
+2002-10-18 Tom Yu <tlyu@mit.edu>
+
+ * api.2/init-v2.exp (test106): Make regexp more forgiving of
+ variant password prompts.
+
+ * api.0/init.exp (test7, test22, test225): Make regexp more
+ forgiving of variant password prompts.
+
2002-09-15 Tom Yu <tlyu@mit.edu>
* api.0/chpass-principal.exp:
diff --git a/src/lib/kadm5/unit-test/api.0/init.exp b/src/lib/kadm5/unit-test/api.0/init.exp
index 62b1bde35..f232d23d0 100644
--- a/src/lib/kadm5/unit-test/api.0/init.exp
+++ b/src/lib/kadm5/unit-test/api.0/init.exp
@@ -104,7 +104,7 @@ proc test7 {} {
expect {
{Enter password:} { }
- -re "key:$" { }
+ -re "\n\[^\n\]+key:\[^\n\]*$" { }
eof {
fail "$test: eof instead of password prompt"
api_exit
@@ -338,7 +338,7 @@ proc test22 {} {
}]
send "\n"
expect {
- -re ":$" { set prompting 1}
+ -re "\n\[^\n\]+:\[^\n\]*$" { set prompting 1}
-re "\nOK .*$prompt$" { fail "$test: premature success" }
-re "\nERROR .*$prompt$" { fail "$test: premature failure" }
timeout { fail "$test: timeout" }
@@ -363,7 +363,7 @@ proc test225 {} {
}]
send "\n"
expect {
- -re ":$" { set prompting 1}
+ -re "\n\[^\n\]+:\[^\n\]*$" { set prompting 1}
-re "\nOK .*$prompt$" { fail "$test: premature success" }
-re "\nERROR .*$prompt$" { fail "$test: premature failure" }
timeout { fail "$test: timeout" }
diff --git a/src/lib/kadm5/unit-test/api.2/init-v2.exp b/src/lib/kadm5/unit-test/api.2/init-v2.exp
index 11eac5b45..0e3359b19 100644
--- a/src/lib/kadm5/unit-test/api.2/init-v2.exp
+++ b/src/lib/kadm5/unit-test/api.2/init-v2.exp
@@ -112,7 +112,8 @@ if {! $RPC} test103
test "init 106"
proc test106 {} {
global test prompt
-
+
+ set prompting 0
send [string trim {
kadm5_init admin admin $KADM5_ADMIN_SERVICE \
[config_params {KADM5_CONFIG_MKEY_FROM_KBD} 1] \
@@ -121,7 +122,7 @@ proc test106 {} {
}]
send "\n"
expect {
- -re ":$" { set prompting 1}
+ -re "\n\[^\n\]+:\[^\n\]*$" { set prompting 1}
-re "\nOK .*$prompt$" { fail "$test: premature success" }
-re "\nERROR .*$prompt$" { fail "$test: premature failure" }
timeout { fail "$test: timeout" }