From: danielk1977 Date: Wed, 16 Jan 2008 08:24:46 +0000 (+0000) Subject: Work around using (regexp) in the (ifcapable) function of the test suite. So that... X-Git-Tag: version-3.6.10~1464 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db4e8867a4f0d58ccf539e595095b0f45ee37d47;p=thirdparty%2Fsqlite.git Work around using (regexp) in the (ifcapable) function of the test suite. So that simpler versions of tcl can call it. (CVS 4713) FossilOrigin-Name: 3aa5606bd4bd750a365454f42ab07826320f5b98 --- diff --git a/manifest b/manifest index 782a90a30c..3bafca0ba5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\sfor\sa\scouple\sof\sminor\smemory\sleaks.\s(CVS\s4712) -D 2008-01-15T02:22:24 +C Work\saround\susing\s(regexp)\sin\sthe\s(ifcapable)\sfunction\sof\sthe\stest\ssuite.\sSo\sthat\ssimpler\sversions\sof\stcl\scan\scall\sit.\s(CVS\s4713) +D 2008-01-16T08:24:46 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in 30789bf70614bad659351660d76b8e533f3340e9 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -445,7 +445,7 @@ F test/table.test 13b1c2e2fb4727b35ee1fb7641fc469214fd2455 F test/tableapi.test 92651a95c23cf955e92407928e640536402fa3cc F test/tclsqlite.test 3fac87cb1059c46b8fa8a60b553f4f1adb0fb6d9 F test/temptable.test 19b851b9e3e64d91e9867619b2a3f5fffee6e125 -F test/tester.tcl 669599b9f84ecdba979ebf202fde11dfa405fe1a +F test/tester.tcl 9ec2de42f310d5c85945a793d118b595b62526dc F test/thread001.test 8fbd9559da0bbdc273e00318c7fd66c162020af7 F test/thread002.test 2c4ad2c386f60f6fe268cd91c769ee35b3c1fd0b F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35 @@ -606,7 +606,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 187f41f54d7cfbaa9f6ce3be4d213a454b600749 -R 94d8fffe25a18201bc94ce39941579d6 -U drh -Z 79adf324172785bd88656a478d418020 +P a13d3e953f1a3e451e8708a8ef064aa1d72cb4e9 +R 58a662df8c8fdddfe7a6980f15d2e446 +U danielk1977 +Z 1556b8cb2220031cd0813fc8b184cf26 diff --git a/manifest.uuid b/manifest.uuid index dddd326d6d..a67b584bc1 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -a13d3e953f1a3e451e8708a8ef064aa1d72cb4e9 \ No newline at end of file +3aa5606bd4bd750a365454f42ab07826320f5b98 \ No newline at end of file diff --git a/test/tester.tcl b/test/tester.tcl index 6b292090d8..0c2d9aca2e 100644 --- a/test/tester.tcl +++ b/test/tester.tcl @@ -11,7 +11,7 @@ # This file implements some common TCL routines used for regression # testing the SQLite library # -# $Id: tester.tcl,v 1.98 2008/01/08 16:03:50 drh Exp $ +# $Id: tester.tcl,v 1.99 2008/01/16 08:24:46 danielk1977 Exp $ set tcl_precision 15 @@ -316,11 +316,31 @@ proc integrity_check {name} { } } +proc fix_ifcapable_expr {expr} { + set ret "" + set state 0 + for {set i 0} {$i < [string length $expr]} {incr i} { + set char [string range $expr $i $i] + set newstate [expr {[string is alnum $char] || $char eq "_"}] + if {$newstate && !$state} { + append ret {$::sqlite_options(} + } + if {!$newstate && $state} { + append ret ) + } + append ret $char + set state $newstate + } + if {$state} {append ret )} + return $ret +} + # Evaluate a boolean expression of capabilities. If true, execute the # code. Omit the code if false. # proc ifcapable {expr code {else ""} {elsecode ""}} { - regsub -all {[a-z_0-9]+} $expr {$::sqlite_options(&)} e2 + #regsub -all {[a-z_0-9]+} $expr {$::sqlite_options(&)} e2 + set e2 [fix_ifcapable_expr $expr] if ($e2) { set c [catch {uplevel 1 $code} r] } else {