+2002-09-15 Tom Yu <tlyu@mit.edu>
+
+ * lib/helpers.exp (expect_tcl_prompt): Use the "-re" flag, and
+ match end of output.
+ (expect_kadm_ok): s/error/perror.
+ (setup_database): Work around tcl 8.4's (incorrect?) output EOL
+ translation.
+
2002-08-29 Ken Raeburn <raeburn@mit.edu>
* Makefile.in: Revert $(S)=>/ change, for Windows support.
global kadmin_tcl_spawn_id
expect {
-i $kadmin_tcl_spawn_id
- "^% " { }
- -re . { error "unexpected output {$expect_out(buffer)} from subprocess, expecting tcl prompt" }
+ -re "^% $" { }
+ -re . { perror "unexpected output {$expect_out(buffer)} from subprocess, expecting tcl prompt" }
timeout { perror "timeout waiting for tcl prompt" }
eof { perror "eof from subprocess when expecting tcl prompt" }
}
expect {
-i $kadmin_tcl_spawn_id
-re "^OK OVSEC_KADM_OK \[^\n\]*\n" {}
- default { error "didn't get ok back" }
+ default { perror "didn't get ok back" }
}
}
# trying to translate rpc_test_setup.sh into inline tcl...
set kadmin_tcl_spawn_id $spawn_id
if [info exists x] { set spawn_id $x }
+ expect_tcl_prompt
+ # tcl 8.4 for some reason screws up autodetection of output EOL
+ # translation. Work around it for now.
+ send_tcl_cmd_await_echo "if { \[info commands fconfigure\] ne \"\" } { fconfigure stdout -translation lf }"
expect_tcl_prompt
send_tcl_cmd_await_echo "source {$TCLUTIL}"
expect_tcl_prompt