summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 14:50:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-09-19 14:50:11 (GMT)
commitc57eb3c77c77749299dfec90a74977fa9c5c559b (patch)
treeb1a93c9472066ad889bb814aa68d0b255123be23 /tests
parentbd029b94a1f825a22bf635e4c255406562741d5b (diff)
parent562176ad5a881a5f92f2985feab5401c375d559a (diff)
downloadtcl-c57eb3c77c77749299dfec90a74977fa9c5c559b.zip
tcl-c57eb3c77c77749299dfec90a74977fa9c5c559b.tar.gz
tcl-c57eb3c77c77749299dfec90a74977fa9c5c559b.tar.bz2
merge trunkfrq_3527238
<p>change dde version to 1.4.0b2
Diffstat (limited to 'tests')
-rw-r--r--tests/fileSystem.test4
-rw-r--r--tests/http.test16
-rw-r--r--tests/ioTrans.test12
-rw-r--r--tests/msgcat.test50
-rw-r--r--tests/oo.test4
-rw-r--r--tests/ooNext2.test10
-rw-r--r--tests/thread.test2
-rw-r--r--tests/winDde.test4
8 files changed, 83 insertions, 19 deletions
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index 38ecbee..b098f35 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -27,7 +27,7 @@ catch {
set ::ddelib [lindex [package ifneeded dde $::ddever] 1]
set ::regver [package require registry]
set ::reglib [lindex [package ifneeded registry $::regver] 1]
- testConstraint loaddll 0
+ testConstraint loaddll 1
}
# Test for commands defined in Tcltest executable
@@ -514,7 +514,7 @@ test filesystem-7.1.1 {load from vfs} -setup {
set dir [pwd]
} -constraints {win testsimplefilesystem loaddll} -body {
# This may cause a crash on exit
- cd [file dirname $::reglib]
+ cd [file dirname $::ddelib]
testsimplefilesystem 1
# This loads dde via a complex copy-to-temp operation
load simplefs:/[file tail $::ddelib] dde
diff --git a/tests/http.test b/tests/http.test
index fe44b47..bde5795 100644
--- a/tests/http.test
+++ b/tests/http.test
@@ -392,11 +392,19 @@ Content-Type {text/plain;charset=utf-8}
Accept-Encoding .*
Content-Length 5}
test http-3.29 "http::geturl $ipv6url" -body {
- set token [http::geturl $ipv6url -validate 1]
- http::code $token
+ # We only want to see if the URL gets parsed correctly. This is
+ # the case if http::geturl succeeds or returns a socket related
+ # error. If the parsing is wrong, we'll get a parse error.
+ # It'd be better to separate the URL parser from http::geturl, so
+ # that it can be tested without also trying to make a connection.
+ set error [catch {http::geturl $ipv6url -validate 1} token]
+ if {$error && [string match "couldn't open socket: *" $token]} {
+ set error 0
+ }
+ set error
} -cleanup {
- http::cleanup $token
-} -result "HTTP/1.0 200 OK"
+ catch { http::cleanup $token }
+} -result 0
test http-4.1 {http::Event} -body {
set token [http::geturl $url -keepalive 0]
diff --git a/tests/ioTrans.test b/tests/ioTrans.test
index db9a2cb..7027ec1 100644
--- a/tests/ioTrans.test
+++ b/tests/ioTrans.test
@@ -283,6 +283,8 @@ test iortrans-3.1 {chan finalize, handler destruction has no effect on channel}
lappend res [catch {close $c} msg] $msg
lappend res [file channels file*]
lappend res [file channels rt*]
+} -cleanup {
+ tempdone
} -result {{initialize rt* {read write}} file* file* {} 1 {invalid command name "foo"} {} {}}
test iortrans-3.2 {chan finalize, for close} -setup {
set res {}
@@ -300,6 +302,7 @@ test iortrans-3.2 {chan finalize, for close} -setup {
lappend res [info command foo]
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} {} foo}
test iortrans-3.3 {chan finalize, for close, error, close error} -setup {
set res {}
@@ -315,6 +318,7 @@ test iortrans-3.3 {chan finalize, for close, error, close error} -setup {
lappend res [file channels rt*]
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 5 {}}
test iortrans-3.4 {chan finalize, for close, error, close error} -setup {
set res {}
@@ -328,6 +332,7 @@ test iortrans-3.4 {chan finalize, for close, error, close error} -setup {
lappend res [catch {close $c} msg] $msg $::errorInfo
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 FOO {FOO
*"close $c"}}
test iortrans-3.5 {chan finalize, for close, arbitrary result, ignored} -setup {
@@ -342,6 +347,7 @@ test iortrans-3.5 {chan finalize, for close, arbitrary result, ignored} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 0 {}}
test iortrans-3.6 {chan finalize, for close, break, close error} -setup {
set res {}
@@ -355,6 +361,7 @@ test iortrans-3.6 {chan finalize, for close, break, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.7 {chan finalize, for close, continue, close error} -setup {
set res {}
@@ -368,6 +375,7 @@ test iortrans-3.7 {chan finalize, for close, continue, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.8 {chan finalize, for close, custom code, close error} -setup {
set res {}
@@ -381,6 +389,7 @@ test iortrans-3.8 {chan finalize, for close, custom code, close error} -setup {
lappend res [catch {close $c} msg] $msg
} -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code*}
test iortrans-3.9 {chan finalize, for close, ignore level, close error} -setup {
set res {}
@@ -395,6 +404,7 @@ test iortrans-3.9 {chan finalize, for close, ignore level, close error} -setup {
noteOpts $opt
} -match glob -cleanup {
rename foo {}
+ tempdone
} -result {{initialize rt* {read write}} file* {finalize rt*} 1 *bad code* {-code 1 -level 0 -errorcode NONE -errorline 1 -errorinfo *bad code*subcommand "finalize"*}}
# --- === *** ###########################
@@ -1036,6 +1046,8 @@ test iortrans-11.2 {delete interp of reflected transform} -setup {
chan event $c readable no-op
}
interp delete slave
+} -cleanup {
+ tempdone
} -result {}
# ### ### ### ######### ######### #########
diff --git a/tests/msgcat.test b/tests/msgcat.test
index bbcd023..1522354 100644
--- a/tests/msgcat.test
+++ b/tests/msgcat.test
@@ -17,8 +17,8 @@ if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2 required."
return
}
-if {[catch {package require msgcat 1.4.5}]} {
- puts stderr "Skipping tests in [info script]. No msgcat 1.4.5 found to test."
+if {[catch {package require msgcat 1.5.0}]} {
+ puts stderr "Skipping tests in [info script]. No msgcat 1.5.0 found to test."
return
}
@@ -56,6 +56,13 @@ namespace eval ::msgcat::test {
set result [string tolower \
[msgcat::ConvertLocale $::tcl::mac::locale]]
} else {
+ if {([info sharedlibextension] == ".dll")
+ && ![catch {package require registry}]} {
+ # Windows and Cygwin have other ways to determine the
+ # locale when the environment variables are missing
+ # and the registry package is present
+ continue
+ }
set result c
}
}
@@ -611,6 +618,45 @@ namespace eval ::msgcat::test {
mc "this is a %s" "good test"
} -result "this is a good test"
+ # Tests msgcat-8.*: [mcflset]
+
+ set msgdir1 [makeDirectory msgdir1]
+ makeFile {::msgcat::mcflset k1 v1} l1.msg $msgdir1
+
+ test msgcat-8.1 {mcflset} -setup {
+ variable locale [mclocale]
+ mclocale l1
+ mcload $msgdir1
+ } -cleanup {
+ mclocale $locale
+ } -body {
+ mc k1
+ } -result v1
+
+ removeFile l1.msg $msgdir1
+ removeDirectory msgdir1
+
+ set msgdir2 [makeDirectory msgdir2]
+ set msgdir3 [makeDirectory msgdir3]
+ makeFile "::msgcat::mcflset k2 v2 ; ::msgcat::mcload [list $msgdir3]"\
+ l2.msg $msgdir2
+ makeFile {::msgcat::mcflset k3 v3} l2.msg $msgdir3
+
+ # chained mcload
+ test msgcat-8.2 {mcflset} -setup {
+ variable locale [mclocale]
+ mclocale l2
+ mcload $msgdir2
+ } -cleanup {
+ mclocale $locale
+ } -body {
+ return [mc k2][mc k3]
+ } -result v2v3
+
+ removeFile l2.msg $msgdir2
+ removeDirectory msgdir2
+ removeDirectory msgdir3
+
cleanupTests
}
namespace delete ::msgcat::test
diff --git a/tests/oo.test b/tests/oo.test
index 00663e9..540cdf3 100644
--- a/tests/oo.test
+++ b/tests/oo.test
@@ -2,12 +2,12 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 2006-2011 Donal K. Fellows
+# Copyright (c) 2006-2012 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-package require -exact TclOO 0.6.3 ;# Must match value in generic/tclOO.h
+package require -exact TclOO 0.7 ;# Must match value in generic/tclOO.h
package require tcltest 2
if {"::tcltest" in [namespace children]} {
namespace import -force ::tcltest::*
diff --git a/tests/ooNext2.test b/tests/ooNext2.test
index eeade11..e78e0d0 100644
--- a/tests/ooNext2.test
+++ b/tests/ooNext2.test
@@ -2,16 +2,14 @@
# Sourcing this file into Tcl runs the tests and generates output for errors.
# No output means no errors were found.
#
-# Copyright (c) 2006-2008 Donal K. Fellows
+# Copyright (c) 2006-2011 Donal K. Fellows
#
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: oo.test,v 1.59 2011/01/18 16:10:48 dkf Exp $
-package require -exact TclOO 0.6.3 ;# Must match value in configure.in
-if {[lsearch [namespace children] ::tcltest] == -1} {
- package require tcltest 2
+package require -exact TclOO 0.7 ;# Must match value in configure.in
+package require tcltest 2
+if {"::tcltest" in [namespace children]} {
namespace import -force ::tcltest::*
}
diff --git a/tests/thread.test b/tests/thread.test
index f2735da..43222ac 100644
--- a/tests/thread.test
+++ b/tests/thread.test
@@ -79,7 +79,7 @@ if {[testConstraint thread]} {
if {[testConstraint testthread]} {
proc drainEventQueue {} {
while {[set x [testthread event]]} {
- puts "WARNING: drained $x event(s) on main thread"
+ #puts "WARNING: drained $x event(s) on main thread"
}
}
diff --git a/tests/winDde.test b/tests/winDde.test
index f04fb45..9411c92 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -20,7 +20,7 @@ testConstraint dde 0
if {[testConstraint win]} {
if {![catch {
::tcltest::loadTestedCommands
- set ::ddever [package require dde 1.4.0]
+ set ::ddever [package require dde 1.4.0b2]
set ::ddelib [lindex [package ifneeded dde $::ddever] 1]}]} {
testConstraint dde 1
}
@@ -104,7 +104,7 @@ proc createChildProcess {ddeServerName args} {
# -------------------------------------------------------------------------
test winDde-1.0 {check if we are testing the right dll} {win dde} {
set ::ddever
-} {1.4.0}
+} {1.4.0b2}
test winDde-1.1 {Settings the server's topic name} -constraints dde -body {
list [dde servername foobar] [dde servername] [dde servername self]