summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclTest.c3
-rw-r--r--tests/main.test36
3 files changed, 29 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 84af0ff..93b2c59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
-2002-01-07 Don Porter <dgp@users.sourceforge.net>
+2002-01-09 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclTest.c (MainLoop):
+ * tests/main.test (Tcl_Main-1.{3,4,5,6}): Corrected some non-portable
+ tests from the new Tcl_Main changes. Thanks to Kevin Kenny.
+2002-01-07 Don Porter <dgp@users.sourceforge.net>
* generic/tclEvent.c (TclInExit):
* generic/tclIOUtil.c (SetFsPathFromAbsoluteNormalized,
SetFsPathFromAny,Tcl_FSNewNativePath,DupFsPathInternalRep):
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 2b977f2..b2a1af2 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.35 2002/01/05 22:55:52 dgp Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.36 2002/01/09 17:50:56 dgp Exp $
*/
#define TCL_TEST
@@ -162,6 +162,7 @@ static void ExitProcEven _ANSI_ARGS_((ClientData clientData));
static void ExitProcOdd _ANSI_ARGS_((ClientData clientData));
static int GetTimesCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
+static void MainLoop _ANSI_ARGS_((void));
static int NoopCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
static int NoopObjCmd _ANSI_ARGS_((ClientData clientData,
diff --git a/tests/main.test b/tests/main.test
index 62c9631..3916e53 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -1,6 +1,6 @@
# This file contains a collection of tests for generic/tclMain.c.
#
-# RCS: @(#) $Id: main.test,v 1.1 2002/01/05 22:55:52 dgp Exp $
+# RCS: @(#) $Id: main.test,v 1.2 2002/01/09 17:50:56 dgp Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest v2 needed."
@@ -69,21 +69,23 @@ namespace eval ::tcl::main::test {
} -result [list [interpreter] -script 0]\n
test Tcl_Main-1.3 {
- Tcl_Main: encoding of arguments: system encoding loss
+ Tcl_Main: encoding of arguments: done by system encoding
+ Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} script
- set f [open "|[interpreter] script \u0098" r]
+ set f [open "|[interpreter] script \u00c0" r]
} -body {
read $f
} -cleanup {
close $f
removeFile script
- } -result [list script [list \u0098] 0]\n
+ } -result [list script [list [encoding convertfrom [encoding system] \
+ [encoding convertto [encoding system] \u00c0]]] 0]\n
test Tcl_Main-1.4 {
- Tcl_Main: encoding of arguments: system encoding loss
- This test fails due to shortcoming noted in Tcl Patch 491789
- } -constraints [list exec knownBug] -setup {
+ Tcl_Main: encoding of arguments: done by system encoding
+ Note the shortcoming explained in Tcl Patch 491789
+ } -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} script
set f [open "|[interpreter] script \u1234" r]
} -body {
@@ -91,24 +93,27 @@ namespace eval ::tcl::main::test {
} -cleanup {
close $f
removeFile script
- } -result [list script [list \u1234] 0]\n
+ } -result [list script [list [encoding convertfrom [encoding system] \
+ [encoding convertto [encoding system] \u1234]]] 0]\n
test Tcl_Main-1.5 {
Tcl_Main: encoding of script name: system encoding loss
+ Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
- makeFile {puts [list $argv0 $argv $tcl_interactive]} \u0098
- set f [open "|[interpreter] \u0098" r]
+ makeFile {puts [list $argv0 $argv $tcl_interactive]} \u00c0
+ set f [open "|[interpreter] \u00c0" r]
} -body {
read $f
} -cleanup {
close $f
- removeFile \u0098
- } -result [list [list \u0098] {} 0]\n
+ removeFile \u00c0
+ } -result [list [list [encoding convertfrom [encoding system] \
+ [encoding convertto [encoding system] \u00c0]]] {} 0]\n
test Tcl_Main-1.6 {
Tcl_Main: encoding of script name: system encoding loss
- This test fails due to shortcoming noted in Tcl Patch 491789
- } -constraints [list exec knownBug] -setup {
+ Note the shortcoming explained in Tcl Patch 491789
+ } -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} \u1234
set f [open "|[interpreter] \u1234" r]
} -body {
@@ -116,7 +121,8 @@ namespace eval ::tcl::main::test {
} -cleanup {
close $f
removeFile \u1234
- } -result [list [list \u1234] {} 0]\n
+ } -result [list [list [encoding convertfrom [encoding system] \
+ [encoding convertto [encoding system] \u1234]]] {} 0]\n
# Tests Tcl_Main-2.*: application-initialization procedure