From 92c0d0a0116d9bf6af0b41c0206824f23953f9c2 Mon Sep 17 00:00:00 2001 From: dgp Date: Mon, 22 Jan 2018 13:38:47 +0000 Subject: typo --- generic/tclBasic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index c23491c..fa54551 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -4937,7 +4937,7 @@ Tcl_EvalTokensStandard( NULL, NULL); } -#if !defined(TCL_NO_DEPRECATED) && TCL_MINOR_VERSION < 9 +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 /* *---------------------------------------------------------------------- * -- cgit v0.12 From 0abda82b1ef6d5a059df46d1706ae64157523fe7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 23 Jan 2018 14:52:34 +0000 Subject: In Tcl 9.0, don't register oldBooleanType any more. And rename "booleanString" to "boolean" in tclBooleanType. Many extensions (e.g. [http://cyqlite.sourceforge.net/cgi-bin/sqlite/info/451bb2c1f8554eee|sqlite]) still test for "boolean", although that stopped working already for a long time. In Tcl 8.7, do the same when compiled with -DTCL_NO_DEPRECATED. --- generic/tclObj.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/generic/tclObj.c b/generic/tclObj.c index 4ec0a57..b922c39 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -242,6 +242,7 @@ static int SetCmdNameFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr); * implementations. */ +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 static const Tcl_ObjType oldBooleanType = { "boolean", /* name */ NULL, /* freeIntRepProc */ @@ -249,8 +250,13 @@ static const Tcl_ObjType oldBooleanType = { NULL, /* updateStringProc */ TclSetBooleanFromAny /* setFromAnyProc */ }; +#endif const Tcl_ObjType tclBooleanType = { +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 "booleanString", /* name */ +#else + "boolean", /* name */ +#endif NULL, /* freeIntRepProc */ NULL, /* dupIntRepProc */ NULL, /* updateStringProc */ @@ -406,7 +412,9 @@ TclInitObjSubsystem(void) Tcl_RegisterObjType(&tclProcBodyType); /* For backward compatibility only ... */ +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 Tcl_RegisterObjType(&oldBooleanType); +#endif #ifndef TCL_WIDE_INT_IS_LONG Tcl_RegisterObjType(&tclWideIntType); #endif -- cgit v0.12 From e403ff8f45f2d5327b449d9131d2a06896fe34f3 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 Jan 2018 09:59:15 +0000 Subject: Documentation fix: there is no "O" conversion, just "o" for octal. Also, "b" conversions normally don't produce a sign. --- doc/format.n | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/format.n b/doc/format.n index ba044f2..1c511e8 100644 --- a/doc/format.n +++ b/doc/format.n @@ -83,7 +83,7 @@ Specifies that the number should be padded on the left with zeroes instead of spaces. .TP 10 \fB#\fR -Requests an alternate output form. For \fBo\fR and \fBO\fR +Requests an alternate output form. For \fBo\fR conversions it guarantees that the first digit is always \fB0\fR. For \fBx\fR or \fBX\fR conversions, \fB0x\fR or \fB0X\fR (respectively) will be added to the beginning of the result unless it is zero. @@ -169,7 +169,7 @@ for \fBx\fR and for \fBX\fR). .TP 10 \fBb\fR -Convert integer to binary string, using digits 0 and 1. +Convert integer to unsigned binary string, using digits 0 and 1. .TP 10 \fBc\fR Convert integer to the Unicode character it represents. -- cgit v0.12 From f08ea445641489126720965930b2f1e96d44696c Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Jan 2018 20:28:15 +0000 Subject: Dup test names --- tests/info.test | 2 +- tests/link.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/info.test b/tests/info.test index d30bf9a..fbc65ba 100644 --- a/tests/info.test +++ b/tests/info.test @@ -1818,7 +1818,7 @@ test info-38.2 {location information for uplevel, dl, direct-literal} -match glo * {type source line 1814 file info.test cmd etrace level 1} * {type source line 1812 file info.test cmd uplevel\\ \\\\ level 1}} -cleanup {interp delete sub} -test info-39.0 {Bug 4b61afd660} -setup { +test info-39.2 {Bug 4b61afd660} -setup { proc probe {} { return [dict get [info frame -1] line] } diff --git a/tests/link.test b/tests/link.test index 7bde482..22a1fc2 100644 --- a/tests/link.test +++ b/tests/link.test @@ -141,7 +141,7 @@ test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup { set uwide "0O" concat [testlink get] | $int $real $bool $string $wide $char $uchar $short $ushort $uint $long $ulong $float $uwide } -result {0 0.0 0 0 0 0 0 0 0 0 0 0 0.0 0 | 0x 0b 0 0 0O 0X 0B 0O 0x 0b 0o 0X 0B 0O} -test link-2.8 {writing C variables from Tcl} -constraints {testlink} -setup { +test link-2.9 {writing C variables from Tcl} -constraints {testlink} -setup { testlink delete } -body { testlink set 43 1.21 4 - 56785678 64 250 30000 60000 0xbaadbeef 12321 32123 3.25 1231231234 -- cgit v0.12 From 189d0a83d2df3b9f47e30232bdf377d4daeaba2b Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 25 Jan 2018 21:15:36 +0000 Subject: lifetime management of files generated by tests --- tests/chanio.test | 5 +++++ tests/exec.test | 1 - tests/io.test | 5 +++++ tests/ioCmd.test | 5 +---- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/chanio.test b/tests/chanio.test index 2f2540e..541c20d 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -5732,6 +5732,8 @@ test chan-io-47.6 {file events on shared files, deleting file events} {testfeven chan close $f set x } {{script 1} {}} +unset path(foo) +removeFile foo set path(bar) [makeFile {} bar] @@ -5834,6 +5836,9 @@ test chan-io-48.3 {testing readability conditions} {stdio unix nonBlockFiles ope chan close $f list $x $l } {done {0 1 0 1 0 1 0 1 0 1 0 1 0 0}} +unset path(bar) +removeFile bar + test chan-io-48.4 {lf write, testing readability, ^Z termination, auto read mode} {fileevent} { file delete $path(test1) set f [open $path(test1) w] diff --git a/tests/exec.test b/tests/exec.test index 810dfa6..7bb8579 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -287,7 +287,6 @@ test exec-6.3 {redirecting stderr through a pipeline} {exec stdio} { # I/O redirection: combinations. set path(gorp.file2) [makeFile {} gorp.file2] -file delete $path(gorp.file2) test exec-7.1 {multiple I/O redirections} {exec} { exec << "command input" > $path(gorp.file2) [interpreter] $path(cat) < $path(gorp.file) diff --git a/tests/io.test b/tests/io.test index 7275b42..5529881 100644 --- a/tests/io.test +++ b/tests/io.test @@ -6130,6 +6130,8 @@ test io-47.6 {file events on shared files, deleting file events} {testfevent fil close $f set x } {{script 1} {}} +unset path(foo) +removeFile foo set path(bar) [makeFile {} bar] @@ -6232,6 +6234,9 @@ test io-48.3 {testing readability conditions} {stdio unix nonBlockFiles openpipe close $f list $x $l } {done {0 1 0 1 0 1 0 1 0 1 0 1 0 0}} +unset path(bar) +removeFile bar + test io-48.4 {lf write, testing readability, ^Z termination, auto read mode} {fileevent} { file delete $path(test1) set f [open $path(test1) w] diff --git a/tests/ioCmd.test b/tests/ioCmd.test index 5a76d48..1cb7c74 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -366,7 +366,6 @@ test iocmd-10.5 {fblocked command} { set path(test4) [makeFile {} test4] set path(test5) [makeFile {} test5] -file delete $path(test5) test iocmd-11.1 {I/O to command pipelines} {unixOrPc unixExecs} { set f [open $path(test4) w] close $f @@ -3643,8 +3642,6 @@ foreach file [list test1 test2 test3 test4] { } # delay long enough for background processes to finish after 500 -foreach file [list test5] { - removeFile $file -} +removeFile test5 cleanupTests return -- cgit v0.12