diff options
author | Steve Bennett <steveb@workware.net.au> | 2016-04-11 07:50:31 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2016-04-11 07:50:31 +1000 |
commit | 016714c2c0cb9f7dc340fc39e6c310153426df95 (patch) | |
tree | 8ab0d7e1b045f7d42d75bdc1b79becf4f0652707 /tests | |
parent | 0530f14b95d10866137dd42b709d8401c50b7878 (diff) | |
download | jimtcl-016714c2c0cb9f7dc340fc39e6c310153426df95.zip jimtcl-016714c2c0cb9f7dc340fc39e6c310153426df95.tar.gz jimtcl-016714c2c0cb9f7dc340fc39e6c310153426df95.tar.bz2 |
tests/regexp: Remove regexp-22.1
This test is unreliable since the OS may perform additonal caching.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/regexp.test | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/regexp.test b/tests/regexp.test index 50a7772..94107eb 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -653,38 +653,6 @@ test regexp-21.15 {Replace literal backslash} { set value } "\\abc\\def" -test regexp-22.1 {effect of caching} jim { - - set filedata {BEGIN_TABLE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; END_TABLE} - - # Note: use 2 REs because often libc will cache a single regcomp() result - - # t1 should be faster because the compiled re can be cached. - set re1 "END_TABLE" - set re2 "BEGIN_TABLE" - - set t1 [time { - regexp -inline -all $re1 $filedata - regexp -inline -all $re2 $filedata - } 10000] - - # t2 should be slower since the re's need to be recompiled every time - set t2 [time { - set re1 END - append re1 _TABLE - regexp -inline -all $re1 $filedata - set re2 BEGIN - append re2 _TABLE - regexp -inline -all $re2 $filedata - } 10000] - - set t1 [lindex $t1 0] - set t2 [lindex $t2 0] - - # If these two times are within 20% of each other, caching isn't working - expr {$t2 * 1.0 / $t1 < 1.2 && $t1 * 1.0 / $t2 < 1.2} -} {0} - # Tests resulting from bugs reported by users test reg-31.1 {[[:xdigit:]] behaves correctly when followed by [[:space:]]} { set str {2:::DebugWin32} |