1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Bring the sessions branch up-to-date with all the latest trunk changes.

FossilOrigin-Name: 086a127236ee99d67513490fb7b5549e8b752c44
This commit is contained in:
drh
2013-06-26 13:31:50 +00:00
186 changed files with 26930 additions and 3294 deletions

View File

@ -551,6 +551,9 @@ proc do_test {name cmd expected} {
fail_test $name
} else {
if {[regexp {^~?/.*/$} $expected]} {
# "expected" is of the form "/PATTERN/" then the result if correct if
# regular expression PATTERN matches the result. "~/PATTERN/" means
# the regular expression must not match.
if {[string index $expected 0]=="~"} {
set re [string map {# {[-0-9.]+}} [string range $expected 2 end-1]]
set ok [expr {![regexp $re $result]}]
@ -558,6 +561,16 @@ proc do_test {name cmd expected} {
set re [string map {# {[-0-9.]+}} [string range $expected 1 end-1]]
set ok [regexp $re $result]
}
} elseif {[regexp {^~?\*.*\*$} $expected]} {
# "expected" is of the form "*GLOB*" then the result if correct if
# glob pattern GLOB matches the result. "~/GLOB/" means
# the glob must not match.
if {[string index $expected 0]=="~"} {
set e [string range $expected 1 end]
set ok [expr {![string match $e $result]}]
} else {
set ok [string match $expected $result]
}
} else {
set ok [expr {[string compare $result $expected]==0}]
}
@ -799,9 +812,28 @@ proc finalize_testing {} {
set nTest [incr_ntest]
set nErr [set_test_counter errors]
puts "$nErr errors out of $nTest tests"
if {$nErr>0} {
puts "Failures on these tests: [set_test_counter fail_list]"
set nKnown 0
if {[file readable known-problems.txt]} {
set fd [open known-problems.txt]
set content [read $fd]
close $fd
foreach x $content {set known_error($x) 1}
foreach x [set_test_counter fail_list] {
if {[info exists known_error($x)]} {incr nKnown}
}
}
if {$nKnown>0} {
puts "[expr {$nErr-$nKnown}] new errors and $nKnown known errors\
out of $nTest tests"
} else {
puts "$nErr errors out of $nTest tests"
}
if {$nErr>$nKnown} {
puts -nonewline "Failures on these tests:"
foreach x [set_test_counter fail_list] {
if {![info exists known_error($x)]} {puts -nonewline " $x"}
}
puts ""
}
foreach warning [set_test_counter warn_list] {
puts "Warning: $warning"