From: Tom Yu Date: Sat, 19 Oct 2002 01:22:31 +0000 (+0000) Subject: This commit fixes the test suite aspects. Callers of the various X-Git-Tag: krb5-1.3-alpha1~319 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fcbd19fa1eab345d7ca5a97a2a8d2e63c6e60d26;p=krb5.git 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 --- 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 + + * 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 * 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" }