summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2022-11-20 19:10:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2022-11-20 19:10:17 (GMT)
commit4e1d89f819cbe1e0f08e1188f5d9fddeb7ae0d6c (patch)
treee52778f1a2a8746e1a6e80c18eed6fef3bf40642
parent90d13253bd75cb679db561831edc73359d4a23e1 (diff)
parent124340611ed97ad4347b3ce4bc6aa1d76a99f1b0 (diff)
downloadtcl-4e1d89f819cbe1e0f08e1188f5d9fddeb7ae0d6c.zip
tcl-4e1d89f819cbe1e0f08e1188f5d9fddeb7ae0d6c.tar.gz
tcl-4e1d89f819cbe1e0f08e1188f5d9fddeb7ae0d6c.tar.bz2
merge 8.6
-rw-r--r--tests/chanio.test1
-rw-r--r--tests/env.test2
-rw-r--r--tests/exec.test4
-rw-r--r--tests/fileSystemEncoding.test15
-rw-r--r--tests/http.test20
-rw-r--r--tests/io.test1
-rw-r--r--tests/ioCmd.test1
-rw-r--r--tests/platform.test1
-rw-r--r--tests/tcltests.tcl3
-rw-r--r--tests/thread.test2
10 files changed, 23 insertions, 27 deletions
diff --git a/tests/chanio.test b/tests/chanio.test
index 4193f54..787d926 100644
--- a/tests/chanio.test
+++ b/tests/chanio.test
@@ -39,6 +39,7 @@ namespace eval ::tcl::test::io {
package require -exact tcl::test [info patchlevel]
set ::tcltestlib [info loaded {} Tcltest]
}
+ source [file join [file dirname [info script]] tcltests.tcl]
testConstraint testbytestring [llength [info commands testbytestring]]
testConstraint testchannel [llength [info commands testchannel]]
diff --git a/tests/env.test b/tests/env.test
index 4fb4a86..ce7c01e 100644
--- a/tests/env.test
+++ b/tests/env.test
@@ -16,6 +16,8 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
+source [file join [file dirname [info script]] tcltests.tcl]
+
# [exec] is required here to see the actual environment received by child
# processes.
proc getenv {} {
diff --git a/tests/exec.test b/tests/exec.test
index f8bfbde..d1ef418 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -18,10 +18,8 @@ if {"::tcltest" ni [namespace children]} {
package require tcltest 2.5
namespace import -force ::tcltest::*
}
+source [file join [file dirname [info script]] tcltests.tcl]
-# All tests require the "exec" command.
-# Skip them if exec is not defined.
-testConstraint exec [llength [info commands exec]]
# Some skips when running in a macOS CI environment
testConstraint noosxCI [expr {![info exists ::env(MAC_CI)]}]
diff --git a/tests/fileSystemEncoding.test b/tests/fileSystemEncoding.test
index c9d36d2..f47635d 100644
--- a/tests/fileSystemEncoding.test
+++ b/tests/fileSystemEncoding.test
@@ -15,20 +15,7 @@ namespace eval ::tcl::test::fileSystemEncoding {
variable fname1 登鸛鵲樓
- proc autopath {} {
- global auto_path
- set scriptpath [info script]
- set scriptpathnorm [file dirname [file normalize $scriptpath/...]]
- set dirnorm [file dirname $scriptpathnorm]
- set idx [lsearch -exact $auto_path $dirnorm]
- if {$idx >= 0} {
- set auto_path [lreplace $auto_path[set auto_path {}] $idx $idx {}]
- }
- set auto_path [linsert $auto_path[set auto_path {}] 0 0 $dirnorm]
- }
- autopath
-
- package require tcltests
+ source [file join [file dirname [info script]] tcltests.tcl]
test filesystemEncoding-1.0 {
issue bcd100410465
diff --git a/tests/http.test b/tests/http.test
index 08195a6..9d73817 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -18,6 +18,8 @@ if {"::tcltest" ni [namespace children]} {
package require tcltests
package require http 2.10
+testConstraint http2.9.7 [package vsatisfies [package provide http] 2.9.7]
+testConstraint http2.9.8 [package vsatisfies [package provide http] 2.9.8]
proc bgerror {args} {
global errorInfo
@@ -126,25 +128,25 @@ test http-1.6.$ThreadLevel {http::config} -setup {
test http-2.1.$ThreadLevel {http::reset} {
catch {http::reset http#1}
} 0
-test http-2.2.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.2.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding iso-8859-11
} iso8859-11
-test http-2.3.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.3.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding iso-2022-kr
} iso2022-kr
-test http-2.4.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.4.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding shift-jis
} shiftjis
-test http-2.5.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.5.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding windows-437
} cp437
-test http-2.6.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.6.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding latin5
} iso8859-9
-test http-2.7.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.7.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding latin1
} iso8859-1
-test http-2.8.$ThreadLevel {http::CharsetToEncoding} {
+test http-2.8.$ThreadLevel {http::CharsetToEncoding} http2.9.7 {
http::CharsetToEncoding latin4
} binary
@@ -481,10 +483,10 @@ test http-3.33.$ThreadLevel {http::geturl application/xml is text} -body {
} -result {test 4660 /test}
test http-3.34.$ThreadLevel {http::geturl -headers not a list} -returnCodes error -body {
http::geturl http://test/t -headers \"
-} -result {Bad value for -headers ("), must be list}
+} -constraints http2.9.8 -result {Bad value for -headers ("), must be list}
test http-3.35.$ThreadLevel {http::geturl -headers not even number of elements} -returnCodes error -body {
http::geturl http://test/t -headers {List Length 3}
-} -result {Bad value for -headers (List Length 3), number of list elements must be even}
+} -constraints http2.9.8 -result {Bad value for -headers (List Length 3), number of list elements must be even}
test http-4.1.$ThreadLevel {http::Event} -body {
set token [http::geturl $url -keepalive 0]
diff --git a/tests/io.test b/tests/io.test
index 21a2bf8..9ae25bb 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -34,6 +34,7 @@ namespace eval ::tcl::test::io {
package require -exact tcl::test [info patchlevel]
set ::tcltestlib [info loaded {} Tcltest]
}
+ source [file join [file dirname [info script]] tcltests.tcl]
testConstraint testbytestring [llength [info commands testbytestring]]
testConstraint testchannel [llength [info commands testchannel]]
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index e4584ba..c4edd25 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -17,6 +17,7 @@ if {"::tcltest" ni [namespace children]} {
package require tcltest 2.5
namespace import -force ::tcltest::*
}
+source [file join [file dirname [info script]] tcltests.tcl]
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]
diff --git a/tests/platform.test b/tests/platform.test
index b5fd405..9d14f09 100644
--- a/tests/platform.test
+++ b/tests/platform.test
@@ -10,6 +10,7 @@
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
package require tcltest 2.5
+source [file join [file dirname [info script]] tcltests.tcl]
namespace eval ::tcl::test::platform {
namespace import ::tcltest::testConstraint
diff --git a/tests/tcltests.tcl b/tests/tcltests.tcl
index cc0d6a7..a2251bf 100644
--- a/tests/tcltests.tcl
+++ b/tests/tcltests.tcl
@@ -1,5 +1,8 @@
#! /usr/bin/env tclsh
+# Don't overwrite tcltests facilities already present
+if {[package provide tcltests] ne {}} return
+
package require tcltest 2.5
namespace import ::tcltest::*
testConstraint exec [llength [info commands exec]]
diff --git a/tests/thread.test b/tests/thread.test
index 22c1a4f..ff93f84 100644
--- a/tests/thread.test
+++ b/tests/thread.test
@@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} {
# be fully finalized, which avoids valgrind "still reachable" reports.
package require tcltest 2.5
-namespace import ::tcltest::*
+source [file join [file dirname [info script]] tcltests.tcl]
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]