diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-19 22:23:08 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-11-19 22:23:08 (GMT) |
commit | c96b49ed88b11232f11d79f859e6b62418c5c10a (patch) | |
tree | 3127a144602ef0cb05795cd722659052d0388891 /tests | |
parent | 9d8f556865a0a282039621759755c0cf44664039 (diff) | |
parent | 094f23c172acca8f32b0888cd536f01fc1daab1b (diff) | |
download | tcl-c96b49ed88b11232f11d79f859e6b62418c5c10a.zip tcl-c96b49ed88b11232f11d79f859e6b62418c5c10a.tar.gz tcl-c96b49ed88b11232f11d79f859e6b62418c5c10a.tar.bz2 |
merge trunk
Diffstat (limited to 'tests')
-rw-r--r-- | tests/chanio.test | 2 | ||||
-rw-r--r-- | tests/cmdIL.test | 10 | ||||
-rw-r--r-- | tests/http.test | 2 | ||||
-rw-r--r-- | tests/io.test | 2 | ||||
-rw-r--r-- | tests/ioCmd.test | 2 | ||||
-rw-r--r-- | tests/ioTrans.test | 2 | ||||
-rw-r--r-- | tests/lrange.test | 14 | ||||
-rw-r--r-- | tests/socket.test | 2 | ||||
-rw-r--r-- | tests/stringComp.test | 14 | ||||
-rw-r--r-- | tests/thread.test | 2 | ||||
-rw-r--r-- | tests/unixNotfy.test | 2 |
11 files changed, 42 insertions, 12 deletions
diff --git a/tests/chanio.test b/tests/chanio.test index 9bb11f7..665df50 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -40,7 +40,7 @@ namespace eval ::tcl::test::io { testConstraint testfevent [llength [info commands testfevent]] testConstraint testchannelevent [llength [info commands testchannelevent]] testConstraint testmainthread [llength [info commands testmainthread]] - testConstraint thread [expr {0 == [catch {package require Thread 2.6}]}] + testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] # You need a *very* special environment to do some tests. In particular, # many file systems do not support large-files... diff --git a/tests/cmdIL.test b/tests/cmdIL.test index efb0bce..721773f 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -717,6 +717,16 @@ test cmdIL-7.8 {lreverse command - shared intrep [Bug 1675044]} -setup { rename K {} } -result 1 +# This belongs in info test, but adding tests there breaks tests +# that compute source file line numbers. +test info-20.6 {Bug 3587651} -setup { + namespace eval my {namespace eval tcl {namespace eval mathfunc { + proc demo x {return 42} + }}}} -body { namespace eval my {expr {"demo" in [info functions]}}} -cleanup { + namespace delete my +} -result 1 + + # cleanup ::tcltest::cleanupTests return diff --git a/tests/http.test b/tests/http.test index bde5795..9861e0e 100644 --- a/tests/http.test +++ b/tests/http.test @@ -51,7 +51,7 @@ if {![file exists $httpdFile]} { set removeHttpd 1 } -catch {package require Thread 2.6} +catch {package require Thread 2.7-} if {[catch {package present Thread}] == 0 && [file exists $httpdFile]} { set httpthread [thread::create -preserved] thread::send $httpthread [list source $httpdFile] diff --git a/tests/io.test b/tests/io.test index 9621138..0688c14 100644 --- a/tests/io.test +++ b/tests/io.test @@ -41,7 +41,7 @@ testConstraint fcopy [llength [info commands fcopy]] testConstraint testfevent [llength [info commands testfevent]] testConstraint testchannelevent [llength [info commands testchannelevent]] testConstraint testmainthread [llength [info commands testmainthread]] -testConstraint thread [expr {0 == [catch {package require Thread 2.6}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] # You need a *very* special environment to do some tests. In # particular, many file systems do not support large-files... diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5eb0206..03242be 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -24,7 +24,7 @@ catch [list package require -exact Tcltest [info patchlevel]] # Custom constraints used in this file testConstraint fcopy [llength [info commands fcopy]] testConstraint testchannel [llength [info commands testchannel]] -testConstraint thread [expr {0 == [catch {package require Thread 2.6}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] #---------------------------------------------------------------------- diff --git a/tests/ioTrans.test b/tests/ioTrans.test index 7027ec1..5a8874c 100644 --- a/tests/ioTrans.test +++ b/tests/ioTrans.test @@ -21,7 +21,7 @@ catch [list package require -exact Tcltest [info patchlevel]] # Custom constraints used in this file testConstraint testchannel [llength [info commands testchannel]] -testConstraint thread [expr {0 == [catch {package require Thread 2.6}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] # testchannel cut|splice Both needed to test the reflection in threads. # thread::send diff --git a/tests/lrange.test b/tests/lrange.test index 6c81872..17a757e 100644 --- a/tests/lrange.test +++ b/tests/lrange.test @@ -15,7 +15,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest namespace import -force ::tcltest::* } - + test lrange-1.1 {range of list elements} { lrange {a b c d} 1 2 } {b c} @@ -61,9 +61,11 @@ test lrange-1.14 {range of list elements} { test lrange-1.15 {range of list elements} { concat \"[lrange {a b \{\ } 0 2]" } {"a b \{\ "} +# emacs highlighting bug workaround --> " test lrange-1.16 {list element quoting} { lrange {[append a .b]} 0 end } {{[append} a .b\]} + test lrange-2.1 {error conditions} { list [catch {lrange a b} msg] $msg } {1 {wrong # args: should be "lrange list first last"}} @@ -83,6 +85,16 @@ test lrange-2.6 {error conditions} { list [catch {lrange "a b c \{ d e" 1 4} msg] $msg } {1 {unmatched open brace in list}} +test lrange-3.1 {Bug 3588366: end-offsets before start} { + apply {l { + lrange $l 0 end-5 + }} {1 2 3 4 5} +} {} + # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/socket.test b/tests/socket.test index 9f1cc78..5542c09 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -64,7 +64,7 @@ package require tcltest 2 namespace import -force ::tcltest::* # Some tests require the Thread package or exec command -testConstraint thread [expr {0 == [catch {package require Thread 2.6.6}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] testConstraint exec [llength [info commands exec]] # Produce a random port number in the Dynamic/Private range diff --git a/tests/stringComp.test b/tests/stringComp.test index 56fb69d..9e00ce7 100644 --- a/tests/stringComp.test +++ b/tests/stringComp.test @@ -26,7 +26,7 @@ catch [list package require -exact Tcltest [info patchlevel]] # Some tests require the testobj command testConstraint testobj [expr {[info commands testobj] != {}}] - + test stringComp-1.1 {error conditions} { proc foo {} {string gorp a b} list [catch {foo} msg] $msg @@ -677,7 +677,11 @@ test stringComp-11.54 {string match, failure} { } {0 1 1 1 0 0} ## string range -## not yet bc +test stringComp-12.1 {Bug 3588366: end-offsets before start} { + apply {s { + string range $s 0 end-5 + }} 12345 +} {} ## string repeat ## not yet bc @@ -699,8 +703,12 @@ test stringComp-11.54 {string match, failure} { ## string word* ## not yet bc - + # cleanup catch {rename foo {}} ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: diff --git a/tests/thread.test b/tests/thread.test index 43222ac..d79f693 100644 --- a/tests/thread.test +++ b/tests/thread.test @@ -25,7 +25,7 @@ testConstraint testthread [expr {[info commands testthread] != {}}] # Some tests require the Thread package -testConstraint thread [expr {0 == [catch {package require Thread 2.7}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] # Some tests may not work under valgrind diff --git a/tests/unixNotfy.test b/tests/unixNotfy.test index 0646a3d..2f03529 100644 --- a/tests/unixNotfy.test +++ b/tests/unixNotfy.test @@ -17,7 +17,7 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # When run in a Tk shell, these tests hang. testConstraint noTk [expr {0 != [catch {package present Tk}]}] -testConstraint thread [expr {0 == [catch {package require Thread 2.6}]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}] # Darwin always uses a threaded notifier testConstraint unthreaded [expr { ![::tcl::pkgconfig get threaded] |