2001-09-16 04:13:26 +04:00
|
|
|
# 2001 September 15
|
2001-04-07 19:24:33 +04:00
|
|
|
#
|
2001-09-16 04:13:26 +04:00
|
|
|
# The author disclaims copyright to this source code. In place of
|
|
|
|
# a legal notice, here is a blessing:
|
2001-04-07 19:24:33 +04:00
|
|
|
#
|
2001-09-16 04:13:26 +04:00
|
|
|
# May you do good and not evil.
|
|
|
|
# May you find forgiveness for yourself and forgive others.
|
|
|
|
# May you share freely, never taking more than you give.
|
2001-04-07 19:24:33 +04:00
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
# This file implements regression tests for SQLite library. The
|
|
|
|
# focus of this file is testing the sqlite_*_printf() interface.
|
|
|
|
#
|
2007-09-01 14:01:12 +04:00
|
|
|
# $Id: printf.test,v 1.26 2007/09/01 10:01:13 danielk1977 Exp $
|
2001-04-07 19:24:33 +04:00
|
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
|
|
source $testdir/tester.tcl
|
|
|
|
|
|
|
|
set n 1
|
|
|
|
foreach v {1 2 5 10 99 100 1000000 999999999 0 -1 -2 -5 -10 -99 -100 -9999999} {
|
2004-09-09 04:35:29 +04:00
|
|
|
set v32 [expr {$v&0xffffffff}]
|
2001-04-07 19:24:33 +04:00
|
|
|
do_test printf-1.$n.1 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: %d %x %o} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: %d %x %o} $v $v32 $v32]
|
2001-04-07 19:24:33 +04:00
|
|
|
do_test printf-1.$n.2 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: (%6d) (%6x) (%6o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (%6d) (%6x) (%6o)} $v $v32 $v32]
|
2001-04-07 19:24:33 +04:00
|
|
|
do_test printf-1.$n.3 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: (%-6d) (%-6x) (%-6o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (%-6d) (%-6x) (%-6o)} $v $v32 $v32]
|
2001-04-11 18:28:42 +04:00
|
|
|
do_test printf-1.$n.4 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: (%+6d) (%+6x) (%+6o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (%+6d) (%+6x) (%+6o)} $v $v32 $v32]
|
2001-04-11 18:28:42 +04:00
|
|
|
do_test printf-1.$n.5 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: (%06d) (%06x) (%06o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (%06d) (%06x) (%06o)} $v $v32 $v32]
|
2001-04-11 18:28:42 +04:00
|
|
|
do_test printf-1.$n.6 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_int {Three integers: (% 6d) (% 6x) (% 6o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (% 6d) (% 6x) (% 6o)} $v $v32 $v32]
|
2004-06-29 17:04:32 +04:00
|
|
|
do_test printf-1.$n.7 [subst {
|
|
|
|
sqlite3_mprintf_int {Three integers: (%#6d) (%#6x) (%#6o)} $v $v $v
|
2004-09-09 04:35:29 +04:00
|
|
|
}] [format {Three integers: (%#6d) (%#6x) (%#6o)} $v $v32 $v32]
|
2001-04-07 19:24:33 +04:00
|
|
|
incr n
|
|
|
|
}
|
|
|
|
|
2001-09-20 05:44:42 +04:00
|
|
|
|
|
|
|
if {$::tcl_platform(platform)!="windows"} {
|
|
|
|
|
2001-04-07 19:24:33 +04:00
|
|
|
set m 1
|
|
|
|
foreach {a b} {1 1 5 5 10 10 10 5} {
|
|
|
|
set n 1
|
|
|
|
foreach x {0.001 1.0e-20 1.0 0.0 100.0 9.99999 -0.00543 -1.0 -99.99999} {
|
|
|
|
do_test printf-2.$m.$n.1 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_double {A double: %*.*f} $a $b $x
|
2001-04-07 19:24:33 +04:00
|
|
|
}] [format {A double: %*.*f} $a $b $x]
|
|
|
|
do_test printf-2.$m.$n.2 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_double {A double: %*.*e} $a $b $x
|
2001-04-07 19:24:33 +04:00
|
|
|
}] [format {A double: %*.*e} $a $b $x]
|
|
|
|
do_test printf-2.$m.$n.3 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_double {A double: %*.*g} $a $b $x
|
2001-04-07 19:24:33 +04:00
|
|
|
}] [format {A double: %*.*g} $a $b $x]
|
|
|
|
do_test printf-2.$m.$n.4 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_double {A double: %d %d %g} $a $b $x
|
2001-04-07 19:24:33 +04:00
|
|
|
}] [format {A double: %d %d %g} $a $b $x]
|
|
|
|
do_test printf-2.$m.$n.5 [subst {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_double {A double: %d %d %#g} $a $b $x
|
2001-04-07 19:24:33 +04:00
|
|
|
}] [format {A double: %d %d %#g} $a $b $x]
|
2004-06-29 17:04:32 +04:00
|
|
|
do_test printf-2.$m.$n.6 [subst {
|
|
|
|
sqlite3_mprintf_double {A double: %d %d %010g} $a $b $x
|
|
|
|
}] [format {A double: %d %d %010g} $a $b $x]
|
2001-04-07 19:24:33 +04:00
|
|
|
incr n
|
|
|
|
}
|
|
|
|
incr m
|
|
|
|
}
|
|
|
|
|
2005-08-13 07:07:47 +04:00
|
|
|
} ;# endif not windows
|
2001-09-20 05:44:42 +04:00
|
|
|
|
2001-04-07 19:24:33 +04:00
|
|
|
do_test printf-3.1 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {A String: (%*.*s)} 10 10 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {A String: (%*.*s)} 10 10 {This is the string}]
|
|
|
|
do_test printf-3.2 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {A String: (%*.*s)} 10 5 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {A String: (%*.*s)} 10 5 {This is the string}]
|
|
|
|
do_test printf-3.3 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {A String: (%*.*s)} -10 5 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {A String: (%*.*s)} -10 5 {This is the string}]
|
|
|
|
do_test printf-3.4 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A String: (%s)} 1 2 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {%d %d A String: (%s)} 1 2 {This is the string}]
|
|
|
|
do_test printf-3.5 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A String: (%30s)} 1 2 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {%d %d A String: (%30s)} 1 2 {This is the string}]
|
|
|
|
do_test printf-3.6 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A String: (%-30s)} 1 2 {This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
} [format {%d %d A String: (%-30s)} 1 2 {This is the string}]
|
2007-03-31 19:02:49 +04:00
|
|
|
do_test snprintf-3.11 {
|
|
|
|
sqlite3_snprintf_str 2 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x}
|
|
|
|
do_test snprintf-3.12 {
|
|
|
|
sqlite3_snprintf_str 3 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x1}
|
|
|
|
do_test snprintf-3.13 {
|
|
|
|
sqlite3_snprintf_str 4 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10}
|
|
|
|
do_test snprintf-3.14 {
|
|
|
|
sqlite3_snprintf_str 5 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 }
|
|
|
|
do_test snprintf-3.15 {
|
|
|
|
sqlite3_snprintf_str 6 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 1}
|
|
|
|
do_test snprintf-3.16 {
|
|
|
|
sqlite3_snprintf_str 7 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 10}
|
|
|
|
do_test snprintf-3.17 {
|
|
|
|
sqlite3_snprintf_str 8 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 10 }
|
|
|
|
do_test snprintf-3.18 {
|
|
|
|
sqlite3_snprintf_str 9 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 10 T}
|
|
|
|
do_test snprintf-3.19 {
|
|
|
|
sqlite3_snprintf_str 100 {x%d %d %s} 10 10 {This is the string}
|
|
|
|
} {x10 10 This is the string}
|
2001-04-07 19:24:33 +04:00
|
|
|
|
|
|
|
do_test printf-4.1 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A quoted string: '%q'} 1 2 {Hi Y'all}
|
2001-04-07 19:24:33 +04:00
|
|
|
} {1 2 A quoted string: 'Hi Y''all'}
|
2002-06-16 08:56:36 +04:00
|
|
|
do_test printf-4.2 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A NULL pointer in %%q: '%q'} 1 2
|
2002-06-16 08:56:36 +04:00
|
|
|
} {1 2 A NULL pointer in %q: '(NULL)'}
|
|
|
|
do_test printf-4.3 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A quoted string: %Q} 1 2 {Hi Y'all}
|
2002-06-16 08:56:36 +04:00
|
|
|
} {1 2 A quoted string: 'Hi Y''all'}
|
|
|
|
do_test printf-4.4 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d A NULL pointer in %%Q: %Q} 1 2
|
2002-06-16 08:56:36 +04:00
|
|
|
} {1 2 A NULL pointer in %Q: NULL}
|
2001-04-07 19:24:33 +04:00
|
|
|
|
2001-04-11 18:28:42 +04:00
|
|
|
do_test printf-5.1 {
|
2004-06-15 03:46:47 +04:00
|
|
|
set x [sqlite3_mprintf_str {%d %d %100000s} 0 0 {Hello}]
|
2001-04-11 18:28:42 +04:00
|
|
|
string length $x
|
2005-09-07 01:40:45 +04:00
|
|
|
} {344}
|
2001-04-11 18:28:42 +04:00
|
|
|
do_test printf-5.2 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_str {%d %d (%-10.10s) %} -9 -10 {HelloHelloHello}
|
2001-04-11 18:28:42 +04:00
|
|
|
} {-9 -10 (HelloHello) %}
|
|
|
|
|
2003-06-16 07:08:18 +04:00
|
|
|
do_test printf-6.1 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_z_test , one two three four five six
|
2003-06-16 07:08:18 +04:00
|
|
|
} {,one,two,three,four,five,six}
|
|
|
|
|
2004-02-21 22:41:04 +03:00
|
|
|
|
|
|
|
do_test printf-7.1 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_scaled {A double: %g} 1.0e307 1.0
|
2004-02-21 22:41:04 +03:00
|
|
|
} {A double: 1e+307}
|
|
|
|
do_test printf-7.2 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_scaled {A double: %g} 1.0e307 10.0
|
2004-02-21 22:41:04 +03:00
|
|
|
} {A double: 1e+308}
|
|
|
|
do_test printf-7.3 {
|
2004-06-15 03:46:47 +04:00
|
|
|
sqlite3_mprintf_scaled {A double: %g} 1.0e307 100.0
|
2007-05-10 21:23:11 +04:00
|
|
|
} {A double: Inf}
|
|
|
|
do_test printf-7.4 {
|
|
|
|
sqlite3_mprintf_scaled {A double: %g} -1.0e307 100.0
|
|
|
|
} {A double: -Inf}
|
|
|
|
do_test printf-7.5 {
|
|
|
|
sqlite3_mprintf_scaled {A double: %+g} 1.0e307 100.0
|
|
|
|
} {A double: +Inf}
|
2004-02-21 22:41:04 +03:00
|
|
|
|
2004-06-25 05:10:48 +04:00
|
|
|
do_test printf-8.1 {
|
|
|
|
sqlite3_mprintf_int {%u %u %u} 0x7fffffff 0x80000000 0xffffffff
|
|
|
|
} {2147483647 2147483648 4294967295}
|
|
|
|
do_test printf-8.2 {
|
|
|
|
sqlite3_mprintf_int {%lu %lu %lu} 0x7fffffff 0x80000000 0xffffffff
|
|
|
|
} {2147483647 2147483648 4294967295}
|
|
|
|
do_test printf-8.3 {
|
|
|
|
sqlite3_mprintf_int64 {%llu %llu %llu} 2147483647 2147483648 4294967296
|
|
|
|
} {2147483647 2147483648 4294967296}
|
|
|
|
do_test printf-8.4 {
|
|
|
|
sqlite3_mprintf_int64 {%lld %lld %lld} 2147483647 2147483648 4294967296
|
|
|
|
} {2147483647 2147483648 4294967296}
|
|
|
|
do_test printf-8.5 {
|
|
|
|
sqlite3_mprintf_int64 {%llx %llx %llx} 2147483647 2147483648 4294967296
|
|
|
|
} {7fffffff 80000000 100000000}
|
|
|
|
do_test printf-8.6 {
|
|
|
|
sqlite3_mprintf_int64 {%llx %llo %lld} -1 -1 -1
|
|
|
|
} {ffffffffffffffff 1777777777777777777777 -1}
|
2007-09-01 14:01:12 +04:00
|
|
|
do_test printf-8.7 {
|
|
|
|
sqlite3_mprintf_int64 {%llx %llx %llx} +2147483647 +2147483648 +4294967296
|
|
|
|
} {7fffffff 80000000 100000000}
|
2004-06-25 05:10:48 +04:00
|
|
|
|
2004-06-29 17:04:32 +04:00
|
|
|
do_test printf-9.1 {
|
|
|
|
sqlite3_mprintf_int {%*.*c} 4 4 65
|
|
|
|
} {AAAA}
|
|
|
|
do_test printf-9.2 {
|
|
|
|
sqlite3_mprintf_int {%*.*c} -4 1 66
|
|
|
|
} {B }
|
|
|
|
do_test printf-9.3 {
|
|
|
|
sqlite3_mprintf_int {%*.*c} 4 1 67
|
|
|
|
} { C}
|
|
|
|
do_test printf-9.4 {
|
2005-08-19 06:26:27 +04:00
|
|
|
sqlite3_mprintf_int {%d %d %c} 4 1 67
|
|
|
|
} {4 1 C}
|
|
|
|
set ten { }
|
|
|
|
set fifty $ten$ten$ten$ten$ten
|
|
|
|
do_test printf-9.5 {
|
|
|
|
sqlite3_mprintf_int {%d %*c} 1 -201 67
|
|
|
|
} "1 C$fifty$fifty$fifty$fifty"
|
|
|
|
do_test printf-9.6 {
|
2006-03-06 23:55:46 +03:00
|
|
|
sqlite3_mprintf_int {hi%12345.12346yhello} 0 0 0
|
|
|
|
} {hi}
|
2004-06-29 17:04:32 +04:00
|
|
|
|
2004-07-18 01:56:09 +04:00
|
|
|
# Ticket #812
|
|
|
|
#
|
|
|
|
do_test printf-10.1 {
|
|
|
|
sqlite3_mprintf_stronly %s {}
|
|
|
|
} {}
|
|
|
|
|
2004-07-27 17:38:47 +04:00
|
|
|
# Ticket #831
|
|
|
|
#
|
|
|
|
do_test printf-10.2 {
|
|
|
|
sqlite3_mprintf_stronly %q {}
|
|
|
|
} {}
|
|
|
|
|
2005-08-13 07:07:47 +04:00
|
|
|
# Ticket #1340: Test for loss of precision on large positive exponents
|
|
|
|
#
|
|
|
|
do_test printf-10.3 {
|
|
|
|
sqlite3_mprintf_double {%d %d %f} 1 1 1e300
|
|
|
|
} {1 1 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000}
|
|
|
|
|
2005-08-13 16:59:14 +04:00
|
|
|
# The non-standard '!' flag on a 'g' conversion forces a decimal point
|
|
|
|
# and at least one digit on either side of the decimal point.
|
|
|
|
#
|
|
|
|
do_test printf-11.1 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!g} 1 1 1
|
|
|
|
} {1 1 1.0}
|
|
|
|
do_test printf-11.2 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!g} 1 1 123
|
|
|
|
} {1 1 123.0}
|
|
|
|
do_test printf-11.3 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!g} 1 1 12.3
|
|
|
|
} {1 1 12.3}
|
|
|
|
do_test printf-11.4 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!g} 1 1 0.123
|
|
|
|
} {1 1 0.123}
|
|
|
|
do_test printf-11.5 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!.15g} 1 1 1
|
|
|
|
} {1 1 1.0}
|
|
|
|
do_test printf-11.6 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!.15g} 1 1 1e10
|
|
|
|
} {1 1 10000000000.0}
|
|
|
|
do_test printf-11.7 {
|
|
|
|
sqlite3_mprintf_double {%d %d %!.15g} 1 1 1e300
|
|
|
|
} {1 1 1.0e+300}
|
|
|
|
|
2005-08-19 06:26:27 +04:00
|
|
|
# Additional tests for coverage
|
|
|
|
#
|
|
|
|
do_test printf-12.1 {
|
|
|
|
sqlite3_mprintf_double {%d %d %.2000g} 1 1 1.0
|
|
|
|
} {1 1 1}
|
2004-07-18 01:56:09 +04:00
|
|
|
|
2005-08-30 23:30:59 +04:00
|
|
|
# Floating point boundary cases
|
|
|
|
#
|
|
|
|
do_test printf-13.1 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f 4024000000000000
|
|
|
|
} {10.00000000000000000000}
|
|
|
|
do_test printf-13.2 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f 4197d78400000000
|
|
|
|
} {100000000.00000000000000000000}
|
|
|
|
do_test printf-13.3 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f 4693b8b5b5056e17
|
|
|
|
} {100000000000000000000000000000000.00000000000000000000}
|
2007-05-10 21:23:11 +04:00
|
|
|
do_test printf-13.4 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f 7ff0000000000000
|
|
|
|
} {Inf}
|
|
|
|
do_test printf-13.5 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f fff0000000000000
|
|
|
|
} {-Inf}
|
|
|
|
do_test printf-13.6 {
|
|
|
|
sqlite3_mprintf_hexdouble %.20f fff8000000000000
|
|
|
|
} {NaN}
|
2005-08-30 23:30:59 +04:00
|
|
|
|
2006-03-19 16:00:25 +03:00
|
|
|
do_test printf-14.1 {
|
|
|
|
sqlite3_mprintf_str {abc-%y-123} 0 0 {not used}
|
|
|
|
} {abc-}
|
|
|
|
do_test printf-14.2 {
|
|
|
|
sqlite3_mprintf_n_test {xyzzy}
|
|
|
|
} 5
|
2007-03-31 19:02:49 +04:00
|
|
|
do_test printf-14.3 {
|
|
|
|
sqlite3_mprintf_str {abc-%T-123} 0 0 {not used}
|
|
|
|
} {abc-}
|
2006-03-19 16:00:25 +03:00
|
|
|
|
2007-05-07 15:24:30 +04:00
|
|
|
do_test printf-15.1 {
|
|
|
|
sqlite3_snprintf_int 5 {12345} 0
|
|
|
|
} {1234}
|
|
|
|
do_test printf-15.2 {
|
|
|
|
sqlite3_snprintf_int 5 {} 0
|
|
|
|
} {}
|
|
|
|
do_test printf-15.3 {
|
|
|
|
sqlite3_snprintf_int 0 {} 0
|
|
|
|
} {abcdefghijklmnopqrstuvwxyz}
|
2005-08-30 23:30:59 +04:00
|
|
|
|
2007-09-01 13:02:53 +04:00
|
|
|
# Now test malloc() failure within a sqlite3_mprintf():
|
|
|
|
#
|
|
|
|
foreach var {a b c d} {
|
|
|
|
set $var [string repeat $var 400]
|
|
|
|
}
|
|
|
|
set str1 "[string repeat A 360]%d%d%s"
|
|
|
|
set str2 [string repeat B 5000]
|
|
|
|
set zSuccess "[string repeat A 360]11[string repeat B 5000]"
|
|
|
|
foreach ::iRepeat {0 1} {
|
|
|
|
set nTestNum 1
|
|
|
|
while {1} {
|
|
|
|
sqlite3_memdebug_fail $nTestNum -repeat $::iRepeat
|
|
|
|
set z [sqlite3_mprintf_str $str1 1 1 $str2]
|
|
|
|
set nFail [sqlite3_memdebug_fail -1 -benign nBenign]
|
|
|
|
do_test printf-malloc-$::iRepeat.$nTestNum {
|
|
|
|
expr {($nFail>0 && $z eq "") || ($nFail==$nBenign && $z eq $zSuccess)}
|
|
|
|
} {1}
|
|
|
|
if {$nFail == 0} break
|
|
|
|
incr nTestNum
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2001-04-07 19:24:33 +04:00
|
|
|
finish_test
|
2007-09-01 13:02:53 +04:00
|
|
|
|