Commit 45833618 authored by David Byers's avatar David Byers

Moved file to ../leaks.0

parent 7eb43d82
# ----------------------------------------------------------------------
# Test for leaks in conference creation
read_versions
source "$srcdir/config/leaks.exp"
startup_leaks
send "2000 88 [holl "Leaks Conference 2000"] 00000000 1 { 1000 00000000 0 [holl "Aux-items rock!"] }\n"
simple_expect "=2000 6"
shutdown_leaks
read_usage_base
startup_leaks
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr 2000 + $i] 88 [holl "Leaks Conference [expr 2000 + $i]"] 00000000 1 { 1000 00000000 0 [holl "Aux-items rock!"] }\n"
simple_expect "=[expr 2000 + $i] [expr 6 + $i]"
}
shutdown_leaks
check_usage "Conference creation" "leaks01"
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test for leaks in person creation
startup_leaks
send "3000 89 [holl "Leaky Memory 3000"] [holl "wossit"] 1 { 1000 00000000 0 [holl "Aux-items rock!"] }\n"
simple_expect "=3000 6"
shutdown_leaks
read_usage_base
startup_leaks
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr 3000 + $i] 89 [holl "Leaky Memory [expr 3000 + $i]"] [holl "wossit"] 1 { 1000 00000000 0 [holl "Aux-items rock!"] }\n"
simple_expect "=[expr 3000 + $i] [expr 6 + $i]"
}
shutdown_leaks
check_usage "Person creation" "leaks02"
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test for leaks in aux-item parsing
startup_leaks
send "1000 86 [holl "Parse me!"] 1 { 0 5 } 1 { 1000 00000000 0 [holl "Memory leaks blow!"] }\n"
simple_expect "=1000 1"
shutdown_leaks
read_usage_base
startup_leaks
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 1000 ] 86 [holl "Parse me"] 1 { 0 5 } 4 { 1000 00000000 0 [holl "Memory leaks blow!"] 1000 00000000 0 [holl "Memory leaks blow!"] 1000 00000000 0 [holl "Memory leaks blow!"] 1000 00000000 0 [holl "Memory leaks blow!"] }\n"
simple_expect "=[expr $i + 1000] [expr 1 + $i]"
}
shutdown_leaks
check_usage "Aux-item parser" "leaks03"
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test adding aux-items en masse
startup_leaks
send "1000 86 [holl "Sample test"] 1 { 0 5 } 0 { }\n"
simple_expect "=1000 1"
shutdown_leaks
read_usage_base
startup_leaks
send "1000 86 [holl "Sample test"] 1 { 0 5 } 0 { }\n"
simple_expect "=1000 1"
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 1000] 92 1 0 { } 3 { 1000 00000000 0 [holl "Lost my memory blues"] 1000 00000000 0 [holl "Lost my memory blues too"] 1000 00000000 0 [holl "Lost my memory blues again"] }\n"
simple_expect "=[expr $i + 1000]"
}
shutdown_leaks
check_usage "Adding aux-items" "leaks04"
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test adding and deleting aux-items en masse
startup_leaks
send "1000 86 [holl "Sample test"] 1 { 0 5 } 0 { }\n"
simple_expect "=1000 1"
shutdown_leaks
read_usage_base
startup_leaks
send "1000 86 [holl "Sample test"] 1 { 0 5 } 0 { }\n"
simple_expect "=1000 1"
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 1000] 92 1 0 { } 3 { 1000 00000000 0 [holl "Lost my memory blues"] 1000 00000000 0 [holl "Lost my memory blues too"] 1000 00000000 0 [holl "Lost my memory blues again"] }\n"
simple_expect "=[expr $i + 1000]"
}
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 2000] 92 1 3 { [expr $i * 3] [expr $i * 3 + 1] [expr $i * 3 + 2] } 0 { }\n"
simple_expect "=[expr $i + 2000]"
}
shutdown_leaks
check_usage "Adding and deleting aux-items" "leaks05"
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test inheriting a pile of aux-items
startup_leaks
shutdown_leaks
read_usage_base
startup_leaks
send "1000 86 [holl "Sample test"] 1 { 0 5 } 3 { 1000 01000000 0 [holl "Inherit me!"] 1000 01000000 0 [holl "Inherit me too!"] 1000 01000000 0 [holl "Inherit me three!"] }\n"
simple_expect "=1000 1"
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr 1000 + $i] 86 [holl "Sample test"] 2 { 0 5 2 [expr $i + 1] } 1 { 1000 00000000 0 [holl "Don't inherit me"] }\n"
simple_expect "=[expr 1000 + $i] [expr 2 + $i]"
}
shutdown_leaks
check_usage "Adding and inheriting items" "leaks06"
# Check for memory leaks
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test for leaks in system aux items
startup_leaks
shutdown_leaks
read_usage_base
startup_leaks
kom_enable 255
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 1000] 95 0 { } 3 { 1000 00000000 0 [holl "Lost my memory blues"] 1000 00000000 0 [holl "Lost my memory blues too"] 1000 00000000 0 [holl "Lost my memory blues again"] }\n"
simple_expect "=[expr $i + 1000]"
}
shutdown_leaks
check_usage "Adding system aux-items" leaks07
# Check for memory leaks
read_versions
source "$srcdir/config/leaks.exp"
# ----------------------------------------------------------------------
# Test for leaks in system aux items
startup_leaks
shutdown_leaks
read_usage_base
startup_leaks
kom_enable 255
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 1000] 95 0 { } 3 { 1000 00000000 0 [holl "Lost my memory blues"] 1000 00000000 0 [holl "Lost my memory blues too"] 1000 00000000 0 [holl "Lost my memory blues again"] }\n"
simple_expect "=[expr $i + 1000]"
}
for { set i 0 } { $i < 200 } { incr i 1 } {
send "[expr $i + 2000] 95 3 { [expr $i * 3] [expr $i * 3 + 1] [expr $i * 3 + 2] } 0 { }\n"
simple_expect "=[expr $i + 2000]"
}
shutdown_leaks
check_usage "Adding and removing system aux-items" leaks08
read_versions
source "$srcdir/config/leaks.exp"
startup_leaks ""
shutdown_leaks
read_usage_base
source "$srcdir/lyskomd.0/00.exp"
check_usage "lyskomd test 00" 00
source "$srcdir/lyskomd.0/01.exp"
check_usage "lyskomd test 01" 01
source "$srcdir/lyskomd.0/02.exp"
check_usage "lyskomd test 02" 02
source "$srcdir/lyskomd.0/03.exp"
check_usage "lyskomd test 03" 03
source "$srcdir/lyskomd.0/05.exp"
check_usage "lyskomd test 05" 05
source "$srcdir/lyskomd.0/06.exp"
check_usage "lyskomd test 06" 06
startup_leaks "lyskomd.0/aux-items.conf"
shutdown_leaks
read_usage_base
source "$srcdir/lyskomd.0/04.exp"
check_usage "lyskomd test 04" 04
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