Commit f1673426 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(lyskomd_start): New argument: db_messages.

(dbck_run): New argument: extra_lines.
parent 80a5e6db
......@@ -535,7 +535,8 @@ proc lyskomd_start {{aux_item_conf_file ""} \
{want_stale 0} \
{confs 6} \
{texts 1} \
{nogarb 0}} {
{nogarb 0} \
{db_messages {}}} {
global spawn_id
global server_id
......@@ -705,6 +706,11 @@ proc lyskomd_start {{aux_item_conf_file ""} \
simple_expect "Lock File = [pwd]/db/lyskomd-lock"
simple_expect "MSG: init_cache: using datafile."
simple_expect "Database saved on $any*"
foreach dbmsg $db_messages {
simple_expect "$dbmsg"
}
simple_expect "Read $confs confs/persons and $texts texts"
foreach logmsg $log_messages {
......@@ -1073,8 +1079,9 @@ proc kill_lyskomd {} {
release_lock
}
proc dbck_run {} {
proc dbck_run {{extra_lines {}}} {
global nl
global any
global test
global any_num
global DBCK_MEMTRACE
......@@ -1103,6 +1110,15 @@ proc dbck_run {} {
}
}
foreach line $extra_lines {
set test "dbck sent extra line $line"
expect {
-re "^$line$nl" {
pass "$test"
}
}
}
set test "dbck sent second line"
expect {
-re "^Read $any_num confs/persons and $any_num texts, eof at $any_num$nl" {
......@@ -1114,6 +1130,10 @@ proc dbck_run {} {
-re "^Press enter to terminate dbck$nl" {
pass "$test"
}
-re "^($any*)$nl" {
fail "$test (unexpected line: $expect_out(1,string))"
exp_continue
}
}
send "\n"
set test "dbck died"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment