From 34d3750e3ce6bd9d08b641e6f99b992ad80740b1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Oct 2020 15:07:03 +0000 Subject: Fix [48898ab5f6a0d957]: Too few is better than not enough? (Inconsistent error messages) --- ChangeLog.2001 | 2 +- doc/clock.n | 8 ++++---- doc/lassign.n | 2 +- generic/tclBasic.c | 4 ++-- generic/tclCompCmdsGR.c | 2 +- library/init.tcl | 4 ++-- tests/apply.test | 2 +- tests/compExpr-old.test | 6 +++--- tests/compExpr.test | 4 ++-- tests/expr-old.test | 8 ++++---- tests/expr.test | 6 +++--- tests/string.test | 22 +++++++++++----------- 12 files changed, 35 insertions(+), 35 deletions(-) diff --git a/ChangeLog.2001 b/ChangeLog.2001 index 9d6d541..5fdff46 100644 --- a/ChangeLog.2001 +++ b/ChangeLog.2001 @@ -3525,7 +3525,7 @@ * generic/tclVar.c (Tcl_UnsetObjCmd): Rewrote argument parser to avoid a read off the end of the argument array that could occur when executing something like [unset -nocomplain] was executed. Improved - the error message given when too few arguments are given (-nocomplain + the error message given when not enough arguments are given (-nocomplain should obviously be *before* --, not after it) and also modified the test suite to take account of that and the documentation to use the same improvement. [Bug 405769] diff --git a/doc/clock.n b/doc/clock.n index a8c6d29..18f921c 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -265,10 +265,10 @@ converts the given time to a calendar date and time of day. It then adds the requisite number of months or years, and reconverts the resulting date and time of day to an absolute time. .PP -If the resulting date is impossible because the month has too few days -(for example, when adding 1 month to 31 January), the last day of the -month is substituted. Thus, adding 1 month to 31 January will result in -28 February in a common year or 29 February in a leap year. +If the resulting date is impossible because the month has not enough +days (for example, when adding 1 month to 31 January), the last day +of the month is substituted. Thus, adding 1 month to 31 January will +result in 28 February in a common year or 29 February in a leap year. .PP The rules for handling anomalies relating to summer time and to the Gregorian calendar are the same when adding/subtracting months and diff --git a/doc/lassign.n b/doc/lassign.n index 5620de6..2c57937 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -25,7 +25,7 @@ unassigned elements is returned. .SH EXAMPLES .PP An illustration of how multiple assignment works, and what happens -when there are either too few or too many elements. +when there are either not enough or too many elements. .PP .CS \fBlassign\fR {a b c} x y z ;# Empty return diff --git a/generic/tclBasic.c b/generic/tclBasic.c index cca87ce..895d160 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -8007,8 +8007,8 @@ MathFuncWrongNumArgs( } } Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "too %s arguments for math function \"%s\"", - (found < expected ? "few" : "many"), name)); + "%s arguments for math function \"%s\"", + (found < expected ? "not enough" : "too many"), name)); Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL); } diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index 990be2a..c453878 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -1073,7 +1073,7 @@ TclCompileLindexCmd( int i, idx, numWords = parsePtr->numWords; /* - * Quit if too few args. + * Quit if not enough args. */ /* TODO: Consider support for compiling expanded args. */ diff --git a/library/init.tcl b/library/init.tcl index da1850c..0713aa2 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -84,7 +84,7 @@ namespace eval tcl { proc min {args} { if {![llength $args]} { return -code error \ - "too few arguments to math function \"min\"" + "not enough arguments to math function \"min\"" } set val Inf foreach arg $args { @@ -100,7 +100,7 @@ namespace eval tcl { proc max {args} { if {![llength $args]} { return -code error \ - "too few arguments to math function \"max\"" + "not enough arguments to math function \"max\"" } set val -Inf foreach arg $args { diff --git a/tests/apply.test b/tests/apply.test index 5fed6ec..0a64aa0 100644 --- a/tests/apply.test +++ b/tests/apply.test @@ -25,7 +25,7 @@ testConstraint memory [llength [info commands memory]] # Tests for wrong number of arguments -test apply-1.1 {too few arguments} -returnCodes error -body { +test apply-1.1 {not enough arguments} -returnCodes error -body { apply } -result {wrong # args: should be "apply lambdaExpr ?arg ...?"} diff --git a/tests/compExpr-old.test b/tests/compExpr-old.test index d4525e6..826fbc6 100644 --- a/tests/compExpr-old.test +++ b/tests/compExpr-old.test @@ -590,13 +590,13 @@ test compExpr-old-15.3 {CompileMathFuncCall: too many arguments} -body { test compExpr-old-15.4 {CompileMathFuncCall: ')' found before last required arg} -body { catch {expr sin()} msg set ::errorInfo -} -match glob -result {too few arguments for math function* +} -match glob -result {not enough arguments for math function* while *ing "expr sin()"} -test compExpr-old-15.5 {CompileMathFuncCall: too few arguments} -body { +test compExpr-old-15.5 {CompileMathFuncCall: not enough arguments} -body { catch {expr pow(1)} msg set ::errorInfo -} -match glob -result {too few arguments for math function* +} -match glob -result {not enough arguments for math function* while *ing "expr pow(1)"} test compExpr-old-15.6 {CompileMathFuncCall: missing ')'} -body { diff --git a/tests/compExpr.test b/tests/compExpr.test index 677266c..d3f1345 100644 --- a/tests/compExpr.test +++ b/tests/compExpr.test @@ -325,9 +325,9 @@ test compExpr-5.3 {CompileMathFuncCall: call registered math function} testmathf test compExpr-5.4 {CompileMathFuncCall: call registered math function} testmathfunctions { expr T2()*3 } 1035 -test compExpr-5.5 {CompileMathFuncCall procedure, too few arguments} -body { +test compExpr-5.5 {CompileMathFuncCall procedure, not enough arguments} -body { expr {atan2(1.0)} -} -returnCodes error -match glob -result {too few arguments for math function*} +} -returnCodes error -match glob -result {not enough arguments for math function*} test compExpr-5.6 {CompileMathFuncCall procedure, complex argument} { format %.6g [expr pow(2.1, 27.5-(24.4*(5%2)))] } 9.97424 diff --git a/tests/expr-old.test b/tests/expr-old.test index 06a00ba..28ec346 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -861,7 +861,7 @@ test expr-old-32.46 {math functions in expressions} -body { } -match glob -result {1 {too many arguments for math function*}} test expr-old-32.47 {math functions in expressions} -body { list [catch {expr srand()} msg] $msg -} -match glob -result {1 {too few arguments for math function*}} +} -match glob -result {1 {not enough arguments for math function*}} test expr-old-32.48 {math functions in expressions} -body { expr srand(3.79) } -returnCodes error -match glob -result * @@ -918,7 +918,7 @@ test expr-old-34.6 {errors in math functions} -body { } -returnCodes error -match glob -result * test expr-old-34.7 {errors in math functions} -body { list [catch {expr hypot(1.0)} msg] $msg -} -match glob -result {1 {too few arguments for math function*}} +} -match glob -result {1 {not enough arguments for math function*}} test expr-old-34.8 {errors in math functions} -body { list [catch {expr hypot(1.0, 2.0, 3.0)} msg] $msg } -match glob -result {1 {too many arguments for math function*}} @@ -1160,7 +1160,7 @@ test expr-old-40.2 {min math function} -body { } -result 0.0 test expr-old-40.3 {min math function} -body { list [catch {expr {min()}} msg] $msg -} -result {1 {too few arguments to math function "min"}} +} -result {1 {not enough arguments to math function "min"}} test expr-old-40.4 {min math function} -body { expr {min(wide(-1) << 30, 4.5, -10)} } -result [expr {wide(-1) << 30}] @@ -1179,7 +1179,7 @@ test expr-old-41.2 {max math function} -body { } -result 0.0 test expr-old-41.3 {max math function} -body { list [catch {expr {max()}} msg] $msg -} -result {1 {too few arguments to math function "max"}} +} -result {1 {not enough arguments to math function "max"}} test expr-old-41.4 {max math function} -body { expr {max(wide(1) << 30, 4.5, -10)} } -result [expr {wide(1) << 30}] diff --git a/tests/expr.test b/tests/expr.test index d2f767d..37d8fe3 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -673,13 +673,13 @@ test expr-15.3 {CompileMathFuncCall: too many arguments} -body { test expr-15.4 {CompileMathFuncCall: ')' found before last required arg} -body { catch {expr sin()} msg set ::errorInfo -} -match glob -result {too few arguments for math function* +} -match glob -result {not enough arguments for math function* while *ing "expr sin()"} -test expr-15.5 {CompileMathFuncCall: too few arguments} -body { +test expr-15.5 {CompileMathFuncCall: not enough arguments} -body { catch {expr pow(1)} msg set ::errorInfo -} -match glob -result {too few arguments for math function* +} -match glob -result {not enough arguments for math function* while *ing "expr pow(1)"} test expr-15.6 {CompileMathFuncCall: missing ')'} -body { diff --git a/tests/string.test b/tests/string.test index 12108ca..18faa51 100644 --- a/tests/string.test +++ b/tests/string.test @@ -37,7 +37,7 @@ test string-1.2 {error conditions} { list [catch {string} msg] $msg } {1 {wrong # args: should be "string subcommand ?arg ...?"}} -test string-2.1 {string compare, too few args} { +test string-2.1 {string compare, not enough args} { list [catch {string compare a} msg] $msg } {1 {wrong # args: should be "string compare ?-nocase? ?-length int? string1 string2"}} test string-2.2 {string compare, bad args} { @@ -177,7 +177,7 @@ test string-3.8 {string equal with length, unequal strings} { string equal -length 2 abc abde } 1 -test string-4.1 {string first, too few args} { +test string-4.1 {string first, not enough args} { list [catch {string first a} msg] $msg } {1 {wrong # args: should be "string first needleString haystackString ?startIndex?"}} test string-4.2 {string first, bad args} { @@ -321,10 +321,10 @@ proc largest_int {} { return [expr {$int-1}] } -test string-6.1 {string is, too few args} { +test string-6.1 {string is, not enough args} { list [catch {string is} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} -test string-6.2 {string is, too few args} { +test string-6.2 {string is, not enough args} { list [catch {string is alpha} msg] $msg } {1 {wrong # args: should be "string is class ?-strict? ?-failindex var? str"}} test string-6.3 {string is, bad args} { @@ -774,7 +774,7 @@ test string-6.131 {string is entier, false on bad hex} { catch {rename largest_int {}} -test string-7.1 {string last, too few args} { +test string-7.1 {string last, not enough args} { list [catch {string last a} msg] $msg } {1 {wrong # args: should be "string last needleString haystackString ?startIndex?"}} test string-7.2 {string last, bad args} { @@ -860,7 +860,7 @@ test string-9.7 {string length, bytearray object} { string length [binary format I* {0x50515253 0x52}] } 8 -test string-10.1 {string map, too few args} { +test string-10.1 {string map, not enough args} { list [catch {string map} msg] $msg } {1 {wrong # args: should be "string map ?-nocase? charMap string"}} test string-10.2 {string map, bad args} { @@ -960,7 +960,7 @@ test string-10.31 {string map, nasty sharing crash from [Bug 1018562]} { string map $a $a } {b b} -test string-11.1 {string match, too few args} { +test string-11.1 {string match, not enough args} { list [catch {string match a} msg] $msg } {1 {wrong # args: should be "string match ?-nocase? pattern string"}} test string-11.2 {string match, too many args} { @@ -1404,7 +1404,7 @@ test string-14.19 {string replace} { string replace {} -1 0 A } A -test string-15.1 {string tolower too few args} { +test string-15.1 {string tolower not enough args} { list [catch {string tolower} msg] $msg } {1 {wrong # args: should be "string tolower string ?first? ?last?"}} test string-15.2 {string tolower bad args} { @@ -1839,7 +1839,7 @@ test string-25.14 {string is list} { list [string is list -failindex x "\uABCD {b c}d e"] $x } {0 2} -test string-26.1 {tcl::prefix, too few args} -body { +test string-26.1 {tcl::prefix, not enough args} -body { tcl::prefix match a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix match ?options? table string"} test string-26.2 {tcl::prefix, bad args} -body { @@ -1966,7 +1966,7 @@ test string-26.13 {tcl::prefix: testing for leaks} -body { } } -constraints memory -result {0} -test string-27.1 {tcl::prefix all, too few args} -body { +test string-27.1 {tcl::prefix all, not enough args} -body { tcl::prefix all a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix all table string"} test string-27.2 {tcl::prefix all, bad args} -body { @@ -1997,7 +1997,7 @@ test string-27.10 {tcl::prefix all} { tcl::prefix all {apa aska appa} {} } {apa aska appa} -test string-28.1 {tcl::prefix longest, too few args} -body { +test string-28.1 {tcl::prefix longest, not enough args} -body { tcl::prefix longest a } -returnCodes 1 -result {wrong # args: should be "tcl::prefix longest table string"} test string-28.2 {tcl::prefix longest, bad args} -body { -- cgit v0.12 From b0654427ca07b5611916baf69d3c05d14ef2441b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ignacio=20Mar=C3=ADn?= Date: Mon, 26 Oct 2020 20:32:16 +0000 Subject: Update TZ info to tzdata2020d. --- library/tzdata/Asia/Gaza | 188 ++++++++++++++++++++++----------------------- library/tzdata/Asia/Hebron | 188 ++++++++++++++++++++++----------------------- 2 files changed, 188 insertions(+), 188 deletions(-) diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 9b73dcc..ae86505 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -110,7 +110,7 @@ set TZData(:Asia/Gaza) { {1395957600 10800 1 EEST} {1414098000 7200 0 EET} {1427493600 10800 1 EEST} - {1445547600 7200 0 EET} + {1445551200 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} @@ -118,165 +118,165 @@ set TZData(:Asia/Gaza) { {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553810400 10800 1 EEST} - {1572040800 7200 0 EET} - {1585260000 10800 1 EEST} - {1604095200 7200 0 EET} - {1616709600 10800 1 EEST} + {1572037200 7200 0 EET} + {1585346400 10800 1 EEST} + {1603490400 7200 0 EET} + {1616796000 10800 1 EEST} {1635544800 7200 0 EET} - {1648159200 10800 1 EEST} + {1648245600 10800 1 EEST} {1666994400 7200 0 EET} - {1680213600 10800 1 EEST} + {1679695200 10800 1 EEST} {1698444000 7200 0 EET} - {1711663200 10800 1 EEST} + {1711749600 10800 1 EEST} {1729893600 7200 0 EET} - {1743112800 10800 1 EEST} + {1743199200 10800 1 EEST} {1761343200 7200 0 EET} - {1774562400 10800 1 EEST} - {1793397600 7200 0 EET} - {1806012000 10800 1 EEST} + {1774648800 10800 1 EEST} + {1792792800 7200 0 EET} + {1806098400 10800 1 EEST} {1824847200 7200 0 EET} - {1838066400 10800 1 EEST} + {1837548000 10800 1 EEST} {1856296800 7200 0 EET} - {1869516000 10800 1 EEST} + {1868997600 10800 1 EEST} {1887746400 7200 0 EET} - {1900965600 10800 1 EEST} + {1901052000 10800 1 EEST} {1919196000 7200 0 EET} - {1932415200 10800 1 EEST} + {1932501600 10800 1 EEST} {1950645600 7200 0 EET} - {1963864800 10800 1 EEST} + {1963951200 10800 1 EEST} {1982700000 7200 0 EET} - {1995314400 10800 1 EEST} + {1995400800 10800 1 EEST} {2014149600 7200 0 EET} - {2027368800 10800 1 EEST} + {2026850400 10800 1 EEST} {2045599200 7200 0 EET} - {2058818400 10800 1 EEST} + {2058300000 10800 1 EEST} {2077048800 7200 0 EET} - {2090268000 10800 1 EEST} + {2090354400 10800 1 EEST} {2108498400 7200 0 EET} - {2121717600 10800 1 EEST} - {2140552800 7200 0 EET} - {2153167200 10800 1 EEST} + {2121804000 10800 1 EEST} + {2139948000 7200 0 EET} + {2153253600 10800 1 EEST} {2172002400 7200 0 EET} - {2184616800 10800 1 EEST} + {2184703200 10800 1 EEST} {2203452000 7200 0 EET} - {2216671200 10800 1 EEST} + {2216152800 10800 1 EEST} {2234901600 7200 0 EET} - {2248120800 10800 1 EEST} + {2248207200 10800 1 EEST} {2266351200 7200 0 EET} - {2279570400 10800 1 EEST} + {2279656800 10800 1 EEST} {2297800800 7200 0 EET} - {2311020000 10800 1 EEST} - {2329855200 7200 0 EET} - {2342469600 10800 1 EEST} + {2311106400 10800 1 EEST} + {2329250400 7200 0 EET} + {2342556000 10800 1 EEST} {2361304800 7200 0 EET} - {2374524000 10800 1 EEST} + {2374005600 10800 1 EEST} {2392754400 7200 0 EET} - {2405973600 10800 1 EEST} + {2405455200 10800 1 EEST} {2424204000 7200 0 EET} - {2437423200 10800 1 EEST} + {2437509600 10800 1 EEST} {2455653600 7200 0 EET} - {2468872800 10800 1 EEST} - {2487708000 7200 0 EET} - {2500322400 10800 1 EEST} + {2468959200 10800 1 EEST} + {2487103200 7200 0 EET} + {2500408800 10800 1 EEST} {2519157600 7200 0 EET} - {2531772000 10800 1 EEST} + {2531858400 10800 1 EEST} {2550607200 7200 0 EET} - {2563826400 10800 1 EEST} + {2563308000 10800 1 EEST} {2582056800 7200 0 EET} - {2595276000 10800 1 EEST} + {2595362400 10800 1 EEST} {2613506400 7200 0 EET} - {2626725600 10800 1 EEST} + {2626812000 10800 1 EEST} {2644956000 7200 0 EET} - {2658175200 10800 1 EEST} - {2677010400 7200 0 EET} - {2689624800 10800 1 EEST} + {2658261600 10800 1 EEST} + {2676405600 7200 0 EET} + {2689711200 10800 1 EEST} {2708460000 7200 0 EET} - {2721679200 10800 1 EEST} + {2721160800 10800 1 EEST} {2739909600 7200 0 EET} - {2753128800 10800 1 EEST} + {2752610400 10800 1 EEST} {2771359200 7200 0 EET} - {2784578400 10800 1 EEST} + {2784664800 10800 1 EEST} {2802808800 7200 0 EET} - {2816028000 10800 1 EEST} + {2816114400 10800 1 EEST} {2834258400 7200 0 EET} - {2847477600 10800 1 EEST} + {2847564000 10800 1 EEST} {2866312800 7200 0 EET} - {2878927200 10800 1 EEST} + {2879013600 10800 1 EEST} {2897762400 7200 0 EET} - {2910981600 10800 1 EEST} + {2910463200 10800 1 EEST} {2929212000 7200 0 EET} - {2942431200 10800 1 EEST} + {2941912800 10800 1 EEST} {2960661600 7200 0 EET} - {2973880800 10800 1 EEST} + {2973967200 10800 1 EEST} {2992111200 7200 0 EET} - {3005330400 10800 1 EEST} - {3024165600 7200 0 EET} - {3036780000 10800 1 EEST} + {3005416800 10800 1 EEST} + {3023560800 7200 0 EET} + {3036866400 10800 1 EEST} {3055615200 7200 0 EET} - {3068229600 10800 1 EEST} + {3068316000 10800 1 EEST} {3087064800 7200 0 EET} - {3100284000 10800 1 EEST} + {3099765600 10800 1 EEST} {3118514400 7200 0 EET} - {3131733600 10800 1 EEST} + {3131820000 10800 1 EEST} {3149964000 7200 0 EET} - {3163183200 10800 1 EEST} + {3163269600 10800 1 EEST} {3181413600 7200 0 EET} - {3194632800 10800 1 EEST} - {3213468000 7200 0 EET} - {3226082400 10800 1 EEST} + {3194719200 10800 1 EEST} + {3212863200 7200 0 EET} + {3226168800 10800 1 EEST} {3244917600 7200 0 EET} - {3258136800 10800 1 EEST} + {3257618400 10800 1 EEST} {3276367200 7200 0 EET} - {3289586400 10800 1 EEST} + {3289068000 10800 1 EEST} {3307816800 7200 0 EET} - {3321036000 10800 1 EEST} + {3321122400 10800 1 EEST} {3339266400 7200 0 EET} - {3352485600 10800 1 EEST} - {3371320800 7200 0 EET} - {3383935200 10800 1 EEST} + {3352572000 10800 1 EEST} + {3370716000 7200 0 EET} + {3384021600 10800 1 EEST} {3402770400 7200 0 EET} - {3415384800 10800 1 EEST} + {3415471200 10800 1 EEST} {3434220000 7200 0 EET} - {3447439200 10800 1 EEST} + {3446920800 10800 1 EEST} {3465669600 7200 0 EET} - {3478888800 10800 1 EEST} + {3478975200 10800 1 EEST} {3497119200 7200 0 EET} - {3510338400 10800 1 EEST} + {3510424800 10800 1 EEST} {3528568800 7200 0 EET} - {3541788000 10800 1 EEST} - {3560623200 7200 0 EET} - {3573237600 10800 1 EEST} + {3541874400 10800 1 EEST} + {3560018400 7200 0 EET} + {3573324000 10800 1 EEST} {3592072800 7200 0 EET} - {3605292000 10800 1 EEST} + {3604773600 10800 1 EEST} {3623522400 7200 0 EET} - {3636741600 10800 1 EEST} + {3636223200 10800 1 EEST} {3654972000 7200 0 EET} - {3668191200 10800 1 EEST} + {3668277600 10800 1 EEST} {3686421600 7200 0 EET} - {3699640800 10800 1 EEST} + {3699727200 10800 1 EEST} {3717871200 7200 0 EET} - {3731090400 10800 1 EEST} + {3731176800 10800 1 EEST} {3749925600 7200 0 EET} - {3762540000 10800 1 EEST} + {3762626400 10800 1 EEST} {3781375200 7200 0 EET} - {3794594400 10800 1 EEST} + {3794076000 10800 1 EEST} {3812824800 7200 0 EET} - {3826044000 10800 1 EEST} + {3825525600 10800 1 EEST} {3844274400 7200 0 EET} - {3857493600 10800 1 EEST} + {3857580000 10800 1 EEST} {3875724000 7200 0 EET} - {3888943200 10800 1 EEST} - {3907778400 7200 0 EET} - {3920392800 10800 1 EEST} + {3889029600 10800 1 EEST} + {3907173600 7200 0 EET} + {3920479200 10800 1 EEST} {3939228000 7200 0 EET} - {3951842400 10800 1 EEST} + {3951928800 10800 1 EEST} {3970677600 7200 0 EET} - {3983896800 10800 1 EEST} + {3983378400 10800 1 EEST} {4002127200 7200 0 EET} - {4015346400 10800 1 EEST} + {4015432800 10800 1 EEST} {4033576800 7200 0 EET} - {4046796000 10800 1 EEST} + {4046882400 10800 1 EEST} {4065026400 7200 0 EET} - {4078245600 10800 1 EEST} - {4097080800 7200 0 EET} + {4078332000 10800 1 EEST} + {4096476000 7200 0 EET} } diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron index fe8f7e1..aa028d8 100644 --- a/library/tzdata/Asia/Hebron +++ b/library/tzdata/Asia/Hebron @@ -109,7 +109,7 @@ set TZData(:Asia/Hebron) { {1395957600 10800 1 EEST} {1414098000 7200 0 EET} {1427493600 10800 1 EEST} - {1445547600 7200 0 EET} + {1445551200 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} @@ -117,165 +117,165 @@ set TZData(:Asia/Hebron) { {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553810400 10800 1 EEST} - {1572040800 7200 0 EET} - {1585260000 10800 1 EEST} - {1604095200 7200 0 EET} - {1616709600 10800 1 EEST} + {1572037200 7200 0 EET} + {1585346400 10800 1 EEST} + {1603490400 7200 0 EET} + {1616796000 10800 1 EEST} {1635544800 7200 0 EET} - {1648159200 10800 1 EEST} + {1648245600 10800 1 EEST} {1666994400 7200 0 EET} - {1680213600 10800 1 EEST} + {1679695200 10800 1 EEST} {1698444000 7200 0 EET} - {1711663200 10800 1 EEST} + {1711749600 10800 1 EEST} {1729893600 7200 0 EET} - {1743112800 10800 1 EEST} + {1743199200 10800 1 EEST} {1761343200 7200 0 EET} - {1774562400 10800 1 EEST} - {1793397600 7200 0 EET} - {1806012000 10800 1 EEST} + {1774648800 10800 1 EEST} + {1792792800 7200 0 EET} + {1806098400 10800 1 EEST} {1824847200 7200 0 EET} - {1838066400 10800 1 EEST} + {1837548000 10800 1 EEST} {1856296800 7200 0 EET} - {1869516000 10800 1 EEST} + {1868997600 10800 1 EEST} {1887746400 7200 0 EET} - {1900965600 10800 1 EEST} + {1901052000 10800 1 EEST} {1919196000 7200 0 EET} - {1932415200 10800 1 EEST} + {1932501600 10800 1 EEST} {1950645600 7200 0 EET} - {1963864800 10800 1 EEST} + {1963951200 10800 1 EEST} {1982700000 7200 0 EET} - {1995314400 10800 1 EEST} + {1995400800 10800 1 EEST} {2014149600 7200 0 EET} - {2027368800 10800 1 EEST} + {2026850400 10800 1 EEST} {2045599200 7200 0 EET} - {2058818400 10800 1 EEST} + {2058300000 10800 1 EEST} {2077048800 7200 0 EET} - {2090268000 10800 1 EEST} + {2090354400 10800 1 EEST} {2108498400 7200 0 EET} - {2121717600 10800 1 EEST} - {2140552800 7200 0 EET} - {2153167200 10800 1 EEST} + {2121804000 10800 1 EEST} + {2139948000 7200 0 EET} + {2153253600 10800 1 EEST} {2172002400 7200 0 EET} - {2184616800 10800 1 EEST} + {2184703200 10800 1 EEST} {2203452000 7200 0 EET} - {2216671200 10800 1 EEST} + {2216152800 10800 1 EEST} {2234901600 7200 0 EET} - {2248120800 10800 1 EEST} + {2248207200 10800 1 EEST} {2266351200 7200 0 EET} - {2279570400 10800 1 EEST} + {2279656800 10800 1 EEST} {2297800800 7200 0 EET} - {2311020000 10800 1 EEST} - {2329855200 7200 0 EET} - {2342469600 10800 1 EEST} + {2311106400 10800 1 EEST} + {2329250400 7200 0 EET} + {2342556000 10800 1 EEST} {2361304800 7200 0 EET} - {2374524000 10800 1 EEST} + {2374005600 10800 1 EEST} {2392754400 7200 0 EET} - {2405973600 10800 1 EEST} + {2405455200 10800 1 EEST} {2424204000 7200 0 EET} - {2437423200 10800 1 EEST} + {2437509600 10800 1 EEST} {2455653600 7200 0 EET} - {2468872800 10800 1 EEST} - {2487708000 7200 0 EET} - {2500322400 10800 1 EEST} + {2468959200 10800 1 EEST} + {2487103200 7200 0 EET} + {2500408800 10800 1 EEST} {2519157600 7200 0 EET} - {2531772000 10800 1 EEST} + {2531858400 10800 1 EEST} {2550607200 7200 0 EET} - {2563826400 10800 1 EEST} + {2563308000 10800 1 EEST} {2582056800 7200 0 EET} - {2595276000 10800 1 EEST} + {2595362400 10800 1 EEST} {2613506400 7200 0 EET} - {2626725600 10800 1 EEST} + {2626812000 10800 1 EEST} {2644956000 7200 0 EET} - {2658175200 10800 1 EEST} - {2677010400 7200 0 EET} - {2689624800 10800 1 EEST} + {2658261600 10800 1 EEST} + {2676405600 7200 0 EET} + {2689711200 10800 1 EEST} {2708460000 7200 0 EET} - {2721679200 10800 1 EEST} + {2721160800 10800 1 EEST} {2739909600 7200 0 EET} - {2753128800 10800 1 EEST} + {2752610400 10800 1 EEST} {2771359200 7200 0 EET} - {2784578400 10800 1 EEST} + {2784664800 10800 1 EEST} {2802808800 7200 0 EET} - {2816028000 10800 1 EEST} + {2816114400 10800 1 EEST} {2834258400 7200 0 EET} - {2847477600 10800 1 EEST} + {2847564000 10800 1 EEST} {2866312800 7200 0 EET} - {2878927200 10800 1 EEST} + {2879013600 10800 1 EEST} {2897762400 7200 0 EET} - {2910981600 10800 1 EEST} + {2910463200 10800 1 EEST} {2929212000 7200 0 EET} - {2942431200 10800 1 EEST} + {2941912800 10800 1 EEST} {2960661600 7200 0 EET} - {2973880800 10800 1 EEST} + {2973967200 10800 1 EEST} {2992111200 7200 0 EET} - {3005330400 10800 1 EEST} - {3024165600 7200 0 EET} - {3036780000 10800 1 EEST} + {3005416800 10800 1 EEST} + {3023560800 7200 0 EET} + {3036866400 10800 1 EEST} {3055615200 7200 0 EET} - {3068229600 10800 1 EEST} + {3068316000 10800 1 EEST} {3087064800 7200 0 EET} - {3100284000 10800 1 EEST} + {3099765600 10800 1 EEST} {3118514400 7200 0 EET} - {3131733600 10800 1 EEST} + {3131820000 10800 1 EEST} {3149964000 7200 0 EET} - {3163183200 10800 1 EEST} + {3163269600 10800 1 EEST} {3181413600 7200 0 EET} - {3194632800 10800 1 EEST} - {3213468000 7200 0 EET} - {3226082400 10800 1 EEST} + {3194719200 10800 1 EEST} + {3212863200 7200 0 EET} + {3226168800 10800 1 EEST} {3244917600 7200 0 EET} - {3258136800 10800 1 EEST} + {3257618400 10800 1 EEST} {3276367200 7200 0 EET} - {3289586400 10800 1 EEST} + {3289068000 10800 1 EEST} {3307816800 7200 0 EET} - {3321036000 10800 1 EEST} + {3321122400 10800 1 EEST} {3339266400 7200 0 EET} - {3352485600 10800 1 EEST} - {3371320800 7200 0 EET} - {3383935200 10800 1 EEST} + {3352572000 10800 1 EEST} + {3370716000 7200 0 EET} + {3384021600 10800 1 EEST} {3402770400 7200 0 EET} - {3415384800 10800 1 EEST} + {3415471200 10800 1 EEST} {3434220000 7200 0 EET} - {3447439200 10800 1 EEST} + {3446920800 10800 1 EEST} {3465669600 7200 0 EET} - {3478888800 10800 1 EEST} + {3478975200 10800 1 EEST} {3497119200 7200 0 EET} - {3510338400 10800 1 EEST} + {3510424800 10800 1 EEST} {3528568800 7200 0 EET} - {3541788000 10800 1 EEST} - {3560623200 7200 0 EET} - {3573237600 10800 1 EEST} + {3541874400 10800 1 EEST} + {3560018400 7200 0 EET} + {3573324000 10800 1 EEST} {3592072800 7200 0 EET} - {3605292000 10800 1 EEST} + {3604773600 10800 1 EEST} {3623522400 7200 0 EET} - {3636741600 10800 1 EEST} + {3636223200 10800 1 EEST} {3654972000 7200 0 EET} - {3668191200 10800 1 EEST} + {3668277600 10800 1 EEST} {3686421600 7200 0 EET} - {3699640800 10800 1 EEST} + {3699727200 10800 1 EEST} {3717871200 7200 0 EET} - {3731090400 10800 1 EEST} + {3731176800 10800 1 EEST} {3749925600 7200 0 EET} - {3762540000 10800 1 EEST} + {3762626400 10800 1 EEST} {3781375200 7200 0 EET} - {3794594400 10800 1 EEST} + {3794076000 10800 1 EEST} {3812824800 7200 0 EET} - {3826044000 10800 1 EEST} + {3825525600 10800 1 EEST} {3844274400 7200 0 EET} - {3857493600 10800 1 EEST} + {3857580000 10800 1 EEST} {3875724000 7200 0 EET} - {3888943200 10800 1 EEST} - {3907778400 7200 0 EET} - {3920392800 10800 1 EEST} + {3889029600 10800 1 EEST} + {3907173600 7200 0 EET} + {3920479200 10800 1 EEST} {3939228000 7200 0 EET} - {3951842400 10800 1 EEST} + {3951928800 10800 1 EEST} {3970677600 7200 0 EET} - {3983896800 10800 1 EEST} + {3983378400 10800 1 EEST} {4002127200 7200 0 EET} - {4015346400 10800 1 EEST} + {4015432800 10800 1 EEST} {4033576800 7200 0 EET} - {4046796000 10800 1 EEST} + {4046882400 10800 1 EEST} {4065026400 7200 0 EET} - {4078245600 10800 1 EEST} - {4097080800 7200 0 EET} + {4078332000 10800 1 EEST} + {4096476000 7200 0 EET} } -- cgit v0.12 From 37d6f900991ec0280a7ecc776cd823f6cb1ab819 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Oct 2020 22:58:22 +0000 Subject: Revert changes in previous commit to clock.n and lassign.n --- doc/clock.n | 8 ++++---- doc/lassign.n | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/clock.n b/doc/clock.n index 18f921c..a8c6d29 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -265,10 +265,10 @@ converts the given time to a calendar date and time of day. It then adds the requisite number of months or years, and reconverts the resulting date and time of day to an absolute time. .PP -If the resulting date is impossible because the month has not enough -days (for example, when adding 1 month to 31 January), the last day -of the month is substituted. Thus, adding 1 month to 31 January will -result in 28 February in a common year or 29 February in a leap year. +If the resulting date is impossible because the month has too few days +(for example, when adding 1 month to 31 January), the last day of the +month is substituted. Thus, adding 1 month to 31 January will result in +28 February in a common year or 29 February in a leap year. .PP The rules for handling anomalies relating to summer time and to the Gregorian calendar are the same when adding/subtracting months and diff --git a/doc/lassign.n b/doc/lassign.n index 2c57937..5620de6 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -25,7 +25,7 @@ unassigned elements is returned. .SH EXAMPLES .PP An illustration of how multiple assignment works, and what happens -when there are either not enough or too many elements. +when there are either too few or too many elements. .PP .CS \fBlassign\fR {a b c} x y z ;# Empty return -- cgit v0.12 From 1c0ca80fe58e9eab0f12a8cdcb964991931ce6c6 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 27 Oct 2020 20:09:37 +0000 Subject: [11229bad5f] New test to demonstrate the bug. --- tests/string.test | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/string.test b/tests/string.test index 8cebce9..4817bec 100644 --- a/tests/string.test +++ b/tests/string.test @@ -2477,6 +2477,13 @@ test string-31.24.$noComp {string insert, string end, pure Uni, both shared} { test string-31.25.$noComp {string insert, neither byte array nor Unicode} { run {tcl::string::insert [makeList a b c] 1 zzzzzz} } {azzzzzz b c} +test string-31.26.$noComp {[11229bad5f] string insert, compiler} -setup { + set i 2 +} -body { + run {tcl::string::insert abcd $i xyz} +} -cleanup { + unset i +} -result abxyzcd test string-32.1.$noComp {string is dict} { string is dict {a b c d} -- cgit v0.12 From 84623a09f22aed5b876eb4f0203a6fbb8df76bf5 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 27 Oct 2020 20:24:13 +0000 Subject: Use TCL_ERROR to signal inability to compile. --- generic/tclCompCmdsSZ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index fe661f8..26698a8 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -462,7 +462,7 @@ TclCompileStringInsertCmd( TCL_INDEX_END, &idx)) { /* Nothing useful knowable - cease compile; let it direct eval */ - return TCL_OK; + return TCL_ERROR; } /* Compute and push the string to be inserted */ -- cgit v0.12 From 109828f0908c398616e42af914ca232a19010e4f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 29 Oct 2020 07:47:08 +0000 Subject: Slight tweak to previous commit: Move definition of __USE_MINGW_ANSI_STDIO to the Makefile --- win/Makefile.in | 2 +- win/tclWinPort.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index 25a919a..ee5cacc 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -82,7 +82,7 @@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0 # To compile without backward compatibility and deprecated code uncomment the # following diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 358398d..d3dbb1b 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -19,10 +19,6 @@ /* See [Bug 3354324]: file mtime sets wrong time */ # define __MINGW_USE_VC2005_COMPAT #endif -#if !defined(__USE_MINGW_ANSI_STDIO) -/* See [Bug c975939973]: Usage of gnu_printf in latest mingw-w64 */ -# define __USE_MINGW_ANSI_STDIO 0 -#endif #define WIN32_LEAN_AND_MEAN #include -- cgit v0.12 From ff316586bc3edcbdf34aa115d14d497e38ae46b2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 29 Oct 2020 08:56:17 +0000 Subject: Fix implib filenames (adapted from Mingw2's 006-proper-implib-name.mingw.patch) --- win/Makefile.in | 6 +++--- win/configure | 8 ++++++-- win/configure.in | 6 +++++- win/tcl.m4 | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/win/Makefile.in b/win/Makefile.in index ee5cacc..324d917 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -143,11 +143,11 @@ TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@ TCL_DLL_FILE = @TCL_DLL_FILE@ TCL_LIB_FILE = @TCL_LIB_FILE@ DDE_DLL_FILE = tcldde$(DDEVER)${DLLSUFFIX} -DDE_LIB_FILE = @LIBPREFIX@tcldde$(DDEVER)${LIBSUFFIX} +DDE_LIB_FILE = @LIBPREFIX@tcldde$(DDEVER)${DLLSUFFIX}${LIBSUFFIX} REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} -REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${LIBSUFFIX} +REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${DLLSUFFIX}${LIBSUFFIX} TEST_EXE_FILE = tcltest${EXESUFFIX} -TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${LIBSUFFIX} +TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${DLLSUFFIX}${LIBSUFFIX} TEST_LOAD_PRMS = package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}] dde];\ package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}] registry] TEST_LOAD_FACILITIES = $(TEST_LOAD_PRMS) diff --git a/win/configure b/win/configure index f52e22c..019fa72 100755 --- a/win/configure +++ b/win/configure @@ -3511,7 +3511,7 @@ echo "$as_me: error: ${CC} does not support the -shared option. SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)" + -Wl,--out-implib,\$(patsubst %.dll,lib%.dll.a,\$@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" @@ -4712,7 +4712,11 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" -eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}" +if test ${SHARED_BUILD} = 0 ; then + eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +else + eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${DLLSUFFIX}.a\"" +fi eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" eval "TCL_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TCL_LIB_FLAG}\"" diff --git a/win/configure.in b/win/configure.in index dc597b9..95bc7be 100644 --- a/win/configure.in +++ b/win/configure.in @@ -204,7 +204,11 @@ eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\"" eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}" -eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}" +if test ${SHARED_BUILD} = 0 ; then + eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${LIBSUFFIX}\"" +else + eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl${VER}${DLLSUFFIX}.a\"" +fi eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\"" eval "TCL_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TCL_LIB_FLAG}\"" diff --git a/win/tcl.m4 b/win/tcl.m4 index 5abc0e6..4932788 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -697,7 +697,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ SHLIB_LD='${CC} -shared' SHLIB_LD_LIBS='${LIBS}' MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \ - -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)" + -Wl,--out-implib,\$(patsubst %.dll,lib%.dll.a,\[$]@)" # DLLSUFFIX is separate because it is the building block for # users of tclConfig.sh that may build shared or static. DLLSUFFIX="\${DBGX}.dll" -- cgit v0.12 From f15717bcda464e47bc87ba9545d00f69ab4077c1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 29 Oct 2020 09:25:55 +0000 Subject: Update TZ info to tzdata2020d. --- library/tzdata/Africa/Algiers | 2 +- library/tzdata/Africa/Casablanca | 20 ++-- library/tzdata/Africa/El_Aaiun | 20 ++-- library/tzdata/America/Dawson | 3 +- library/tzdata/America/Whitehorse | 3 +- library/tzdata/Antarctica/Casey | 5 + library/tzdata/Antarctica/Macquarie | 181 +++++++++++++++++++++++++++++++++- library/tzdata/Asia/Gaza | 188 ++++++++++++++++++------------------ library/tzdata/Asia/Hebron | 188 ++++++++++++++++++------------------ library/tzdata/Europe/Budapest | 45 ++++----- library/tzdata/Europe/Monaco | 4 +- library/tzdata/Europe/Paris | 4 +- library/tzdata/Pacific/Fiji | 2 +- 13 files changed, 426 insertions(+), 239 deletions(-) diff --git a/library/tzdata/Africa/Algiers b/library/tzdata/Africa/Algiers index fe4de22..b26d31c 100644 --- a/library/tzdata/Africa/Algiers +++ b/library/tzdata/Africa/Algiers @@ -2,7 +2,7 @@ set TZData(:Africa/Algiers) { {-9223372036854775808 732 0 LMT} - {-2486679072 561 0 PMT} + {-2486592732 561 0 PMT} {-1855958961 0 0 WET} {-1689814800 3600 1 WEST} {-1680397200 0 0 WET} diff --git a/library/tzdata/Africa/Casablanca b/library/tzdata/Africa/Casablanca index 05ae49f..cb60740 100644 --- a/library/tzdata/Africa/Casablanca +++ b/library/tzdata/Africa/Casablanca @@ -66,7 +66,7 @@ set TZData(:Africa/Casablanca) { {1648346400 0 1 +01} {1651975200 3600 0 +01} {1679191200 0 1 +01} - {1682215200 3600 0 +01} + {1682820000 3600 0 +01} {1710036000 0 1 +01} {1713060000 3600 0 +01} {1740276000 0 1 +01} @@ -82,7 +82,7 @@ set TZData(:Africa/Casablanca) { {1893290400 0 1 +01} {1896919200 3600 0 +01} {1924135200 0 1 +01} - {1927159200 3600 0 +01} + {1927764000 3600 0 +01} {1954980000 0 1 +01} {1958004000 3600 0 +01} {1985220000 0 1 +01} @@ -98,7 +98,7 @@ set TZData(:Africa/Casablanca) { {2138234400 0 1 +01} {2141863200 3600 0 +01} {2169079200 0 1 +01} - {2172103200 3600 0 +01} + {2172708000 3600 0 +01} {2199924000 0 1 +01} {2202948000 3600 0 +01} {2230164000 0 1 +01} @@ -114,7 +114,7 @@ set TZData(:Africa/Casablanca) { {2383178400 0 1 +01} {2386807200 3600 0 +01} {2414023200 0 1 +01} - {2417047200 3600 0 +01} + {2417652000 3600 0 +01} {2444868000 0 1 +01} {2447892000 3600 0 +01} {2475108000 0 1 +01} @@ -130,7 +130,7 @@ set TZData(:Africa/Casablanca) { {2628122400 0 1 +01} {2631751200 3600 0 +01} {2658967200 0 1 +01} - {2661991200 3600 0 +01} + {2662596000 3600 0 +01} {2689812000 0 1 +01} {2692836000 3600 0 +01} {2720052000 0 1 +01} @@ -146,7 +146,7 @@ set TZData(:Africa/Casablanca) { {2873066400 0 1 +01} {2876695200 3600 0 +01} {2903911200 0 1 +01} - {2906935200 3600 0 +01} + {2907540000 3600 0 +01} {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} @@ -162,7 +162,7 @@ set TZData(:Africa/Casablanca) { {3118010400 0 1 +01} {3121639200 3600 0 +01} {3148855200 0 1 +01} - {3151879200 3600 0 +01} + {3152484000 3600 0 +01} {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} @@ -178,7 +178,7 @@ set TZData(:Africa/Casablanca) { {3362954400 0 1 +01} {3366583200 3600 0 +01} {3393799200 0 1 +01} - {3396823200 3600 0 +01} + {3397428000 3600 0 +01} {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} @@ -188,13 +188,13 @@ set TZData(:Africa/Casablanca) { {3515968800 0 1 +01} {3519597600 3600 0 +01} {3546813600 0 1 +01} - {3549837600 3600 0 +01} + {3550442400 3600 0 +01} {3577658400 0 1 +01} {3580682400 3600 0 +01} {3607898400 0 1 +01} {3611527200 3600 0 +01} {3638743200 0 1 +01} - {3641767200 3600 0 +01} + {3642372000 3600 0 +01} {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} diff --git a/library/tzdata/Africa/El_Aaiun b/library/tzdata/Africa/El_Aaiun index 8dbbdea..fd3e88f 100644 --- a/library/tzdata/Africa/El_Aaiun +++ b/library/tzdata/Africa/El_Aaiun @@ -55,7 +55,7 @@ set TZData(:Africa/El_Aaiun) { {1648346400 0 1 +01} {1651975200 3600 0 +01} {1679191200 0 1 +01} - {1682215200 3600 0 +01} + {1682820000 3600 0 +01} {1710036000 0 1 +01} {1713060000 3600 0 +01} {1740276000 0 1 +01} @@ -71,7 +71,7 @@ set TZData(:Africa/El_Aaiun) { {1893290400 0 1 +01} {1896919200 3600 0 +01} {1924135200 0 1 +01} - {1927159200 3600 0 +01} + {1927764000 3600 0 +01} {1954980000 0 1 +01} {1958004000 3600 0 +01} {1985220000 0 1 +01} @@ -87,7 +87,7 @@ set TZData(:Africa/El_Aaiun) { {2138234400 0 1 +01} {2141863200 3600 0 +01} {2169079200 0 1 +01} - {2172103200 3600 0 +01} + {2172708000 3600 0 +01} {2199924000 0 1 +01} {2202948000 3600 0 +01} {2230164000 0 1 +01} @@ -103,7 +103,7 @@ set TZData(:Africa/El_Aaiun) { {2383178400 0 1 +01} {2386807200 3600 0 +01} {2414023200 0 1 +01} - {2417047200 3600 0 +01} + {2417652000 3600 0 +01} {2444868000 0 1 +01} {2447892000 3600 0 +01} {2475108000 0 1 +01} @@ -119,7 +119,7 @@ set TZData(:Africa/El_Aaiun) { {2628122400 0 1 +01} {2631751200 3600 0 +01} {2658967200 0 1 +01} - {2661991200 3600 0 +01} + {2662596000 3600 0 +01} {2689812000 0 1 +01} {2692836000 3600 0 +01} {2720052000 0 1 +01} @@ -135,7 +135,7 @@ set TZData(:Africa/El_Aaiun) { {2873066400 0 1 +01} {2876695200 3600 0 +01} {2903911200 0 1 +01} - {2906935200 3600 0 +01} + {2907540000 3600 0 +01} {2934756000 0 1 +01} {2937780000 3600 0 +01} {2964996000 0 1 +01} @@ -151,7 +151,7 @@ set TZData(:Africa/El_Aaiun) { {3118010400 0 1 +01} {3121639200 3600 0 +01} {3148855200 0 1 +01} - {3151879200 3600 0 +01} + {3152484000 3600 0 +01} {3179700000 0 1 +01} {3182724000 3600 0 +01} {3209940000 0 1 +01} @@ -167,7 +167,7 @@ set TZData(:Africa/El_Aaiun) { {3362954400 0 1 +01} {3366583200 3600 0 +01} {3393799200 0 1 +01} - {3396823200 3600 0 +01} + {3397428000 3600 0 +01} {3424644000 0 1 +01} {3427668000 3600 0 +01} {3454884000 0 1 +01} @@ -177,13 +177,13 @@ set TZData(:Africa/El_Aaiun) { {3515968800 0 1 +01} {3519597600 3600 0 +01} {3546813600 0 1 +01} - {3549837600 3600 0 +01} + {3550442400 3600 0 +01} {3577658400 0 1 +01} {3580682400 3600 0 +01} {3607898400 0 1 +01} {3611527200 3600 0 +01} {3638743200 0 1 +01} - {3641767200 3600 0 +01} + {3642372000 3600 0 +01} {3669588000 0 1 +01} {3672612000 3600 0 +01} {3699828000 0 1 +01} diff --git a/library/tzdata/America/Dawson b/library/tzdata/America/Dawson index 1c827ff..c8e3f26 100644 --- a/library/tzdata/America/Dawson +++ b/library/tzdata/America/Dawson @@ -93,5 +93,6 @@ set TZData(:America/Dawson) { {1541322000 -28800 0 PST} {1552212000 -25200 1 PDT} {1572771600 -28800 0 PST} - {1583661600 -25200 0 MST} + {1583661600 -25200 1 PDT} + {1604217600 -25200 0 MST} } diff --git a/library/tzdata/America/Whitehorse b/library/tzdata/America/Whitehorse index da0c0f0..498a203 100644 --- a/library/tzdata/America/Whitehorse +++ b/library/tzdata/America/Whitehorse @@ -93,5 +93,6 @@ set TZData(:America/Whitehorse) { {1541322000 -28800 0 PST} {1552212000 -25200 1 PDT} {1572771600 -28800 0 PST} - {1583661600 -25200 0 MST} + {1583661600 -25200 1 PDT} + {1604217600 -25200 0 MST} } diff --git a/library/tzdata/Antarctica/Casey b/library/tzdata/Antarctica/Casey index aa37480..56935e3 100644 --- a/library/tzdata/Antarctica/Casey +++ b/library/tzdata/Antarctica/Casey @@ -9,4 +9,9 @@ set TZData(:Antarctica/Casey) { {1329843600 28800 0 +08} {1477065600 39600 0 +11} {1520701200 28800 0 +08} + {1538856000 39600 0 +11} + {1552752000 28800 0 +08} + {1570129200 39600 0 +11} + {1583596800 28800 0 +08} + {1601740860 39600 0 +11} } diff --git a/library/tzdata/Antarctica/Macquarie b/library/tzdata/Antarctica/Macquarie index 60bf7a6..e8ed043 100644 --- a/library/tzdata/Antarctica/Macquarie +++ b/library/tzdata/Antarctica/Macquarie @@ -93,5 +93,184 @@ set TZData(:Antarctica/Macquarie) { {1223136000 39600 1 AEDT} {1238860800 36000 0 AEST} {1254585600 39600 1 AEDT} - {1270310400 39600 0 +11} + {1262264400 39600 1 AEDT} + {1293800400 39600 0 AEST} + {1301760000 36000 0 AEST} + {1317484800 39600 1 AEDT} + {1333209600 36000 0 AEST} + {1349539200 39600 1 AEDT} + {1365264000 36000 0 AEST} + {1380988800 39600 1 AEDT} + {1396713600 36000 0 AEST} + {1412438400 39600 1 AEDT} + {1428163200 36000 0 AEST} + {1443888000 39600 1 AEDT} + {1459612800 36000 0 AEST} + {1475337600 39600 1 AEDT} + {1491062400 36000 0 AEST} + {1506787200 39600 1 AEDT} + {1522512000 36000 0 AEST} + {1538841600 39600 1 AEDT} + {1554566400 36000 0 AEST} + {1570291200 39600 1 AEDT} + {1586016000 36000 0 AEST} + {1601740800 39600 1 AEDT} + {1617465600 36000 0 AEST} + {1633190400 39600 1 AEDT} + {1648915200 36000 0 AEST} + {1664640000 39600 1 AEDT} + {1680364800 36000 0 AEST} + {1696089600 39600 1 AEDT} + {1712419200 36000 0 AEST} + {1728144000 39600 1 AEDT} + {1743868800 36000 0 AEST} + {1759593600 39600 1 AEDT} + {1775318400 36000 0 AEST} + {1791043200 39600 1 AEDT} + {1806768000 36000 0 AEST} + {1822492800 39600 1 AEDT} + {1838217600 36000 0 AEST} + {1853942400 39600 1 AEDT} + {1869667200 36000 0 AEST} + {1885996800 39600 1 AEDT} + {1901721600 36000 0 AEST} + {1917446400 39600 1 AEDT} + {1933171200 36000 0 AEST} + {1948896000 39600 1 AEDT} + {1964620800 36000 0 AEST} + {1980345600 39600 1 AEDT} + {1996070400 36000 0 AEST} + {2011795200 39600 1 AEDT} + {2027520000 36000 0 AEST} + {2043244800 39600 1 AEDT} + {2058969600 36000 0 AEST} + {2075299200 39600 1 AEDT} + {2091024000 36000 0 AEST} + {2106748800 39600 1 AEDT} + {2122473600 36000 0 AEST} + {2138198400 39600 1 AEDT} + {2153923200 36000 0 AEST} + {2169648000 39600 1 AEDT} + {2185372800 36000 0 AEST} + {2201097600 39600 1 AEDT} + {2216822400 36000 0 AEST} + {2233152000 39600 1 AEDT} + {2248876800 36000 0 AEST} + {2264601600 39600 1 AEDT} + {2280326400 36000 0 AEST} + {2296051200 39600 1 AEDT} + {2311776000 36000 0 AEST} + {2327500800 39600 1 AEDT} + {2343225600 36000 0 AEST} + {2358950400 39600 1 AEDT} + {2374675200 36000 0 AEST} + {2390400000 39600 1 AEDT} + {2406124800 36000 0 AEST} + {2422454400 39600 1 AEDT} + {2438179200 36000 0 AEST} + {2453904000 39600 1 AEDT} + {2469628800 36000 0 AEST} + {2485353600 39600 1 AEDT} + {2501078400 36000 0 AEST} + {2516803200 39600 1 AEDT} + {2532528000 36000 0 AEST} + {2548252800 39600 1 AEDT} + {2563977600 36000 0 AEST} + {2579702400 39600 1 AEDT} + {2596032000 36000 0 AEST} + {2611756800 39600 1 AEDT} + {2627481600 36000 0 AEST} + {2643206400 39600 1 AEDT} + {2658931200 36000 0 AEST} + {2674656000 39600 1 AEDT} + {2690380800 36000 0 AEST} + {2706105600 39600 1 AEDT} + {2721830400 36000 0 AEST} + {2737555200 39600 1 AEDT} + {2753280000 36000 0 AEST} + {2769609600 39600 1 AEDT} + {2785334400 36000 0 AEST} + {2801059200 39600 1 AEDT} + {2816784000 36000 0 AEST} + {2832508800 39600 1 AEDT} + {2848233600 36000 0 AEST} + {2863958400 39600 1 AEDT} + {2879683200 36000 0 AEST} + {2895408000 39600 1 AEDT} + {2911132800 36000 0 AEST} + {2926857600 39600 1 AEDT} + {2942582400 36000 0 AEST} + {2958912000 39600 1 AEDT} + {2974636800 36000 0 AEST} + {2990361600 39600 1 AEDT} + {3006086400 36000 0 AEST} + {3021811200 39600 1 AEDT} + {3037536000 36000 0 AEST} + {3053260800 39600 1 AEDT} + {3068985600 36000 0 AEST} + {3084710400 39600 1 AEDT} + {3100435200 36000 0 AEST} + {3116764800 39600 1 AEDT} + {3132489600 36000 0 AEST} + {3148214400 39600 1 AEDT} + {3163939200 36000 0 AEST} + {3179664000 39600 1 AEDT} + {3195388800 36000 0 AEST} + {3211113600 39600 1 AEDT} + {3226838400 36000 0 AEST} + {3242563200 39600 1 AEDT} + {3258288000 36000 0 AEST} + {3274012800 39600 1 AEDT} + {3289737600 36000 0 AEST} + {3306067200 39600 1 AEDT} + {3321792000 36000 0 AEST} + {3337516800 39600 1 AEDT} + {3353241600 36000 0 AEST} + {3368966400 39600 1 AEDT} + {3384691200 36000 0 AEST} + {3400416000 39600 1 AEDT} + {3416140800 36000 0 AEST} + {3431865600 39600 1 AEDT} + {3447590400 36000 0 AEST} + {3463315200 39600 1 AEDT} + {3479644800 36000 0 AEST} + {3495369600 39600 1 AEDT} + {3511094400 36000 0 AEST} + {3526819200 39600 1 AEDT} + {3542544000 36000 0 AEST} + {3558268800 39600 1 AEDT} + {3573993600 36000 0 AEST} + {3589718400 39600 1 AEDT} + {3605443200 36000 0 AEST} + {3621168000 39600 1 AEDT} + {3636892800 36000 0 AEST} + {3653222400 39600 1 AEDT} + {3668947200 36000 0 AEST} + {3684672000 39600 1 AEDT} + {3700396800 36000 0 AEST} + {3716121600 39600 1 AEDT} + {3731846400 36000 0 AEST} + {3747571200 39600 1 AEDT} + {3763296000 36000 0 AEST} + {3779020800 39600 1 AEDT} + {3794745600 36000 0 AEST} + {3810470400 39600 1 AEDT} + {3826195200 36000 0 AEST} + {3842524800 39600 1 AEDT} + {3858249600 36000 0 AEST} + {3873974400 39600 1 AEDT} + {3889699200 36000 0 AEST} + {3905424000 39600 1 AEDT} + {3921148800 36000 0 AEST} + {3936873600 39600 1 AEDT} + {3952598400 36000 0 AEST} + {3968323200 39600 1 AEDT} + {3984048000 36000 0 AEST} + {4000377600 39600 1 AEDT} + {4016102400 36000 0 AEST} + {4031827200 39600 1 AEDT} + {4047552000 36000 0 AEST} + {4063276800 39600 1 AEDT} + {4079001600 36000 0 AEST} + {4094726400 39600 1 AEDT} } diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index 9b73dcc..ae86505 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -110,7 +110,7 @@ set TZData(:Asia/Gaza) { {1395957600 10800 1 EEST} {1414098000 7200 0 EET} {1427493600 10800 1 EEST} - {1445547600 7200 0 EET} + {1445551200 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} @@ -118,165 +118,165 @@ set TZData(:Asia/Gaza) { {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553810400 10800 1 EEST} - {1572040800 7200 0 EET} - {1585260000 10800 1 EEST} - {1604095200 7200 0 EET} - {1616709600 10800 1 EEST} + {1572037200 7200 0 EET} + {1585346400 10800 1 EEST} + {1603490400 7200 0 EET} + {1616796000 10800 1 EEST} {1635544800 7200 0 EET} - {1648159200 10800 1 EEST} + {1648245600 10800 1 EEST} {1666994400 7200 0 EET} - {1680213600 10800 1 EEST} + {1679695200 10800 1 EEST} {1698444000 7200 0 EET} - {1711663200 10800 1 EEST} + {1711749600 10800 1 EEST} {1729893600 7200 0 EET} - {1743112800 10800 1 EEST} + {1743199200 10800 1 EEST} {1761343200 7200 0 EET} - {1774562400 10800 1 EEST} - {1793397600 7200 0 EET} - {1806012000 10800 1 EEST} + {1774648800 10800 1 EEST} + {1792792800 7200 0 EET} + {1806098400 10800 1 EEST} {1824847200 7200 0 EET} - {1838066400 10800 1 EEST} + {1837548000 10800 1 EEST} {1856296800 7200 0 EET} - {1869516000 10800 1 EEST} + {1868997600 10800 1 EEST} {1887746400 7200 0 EET} - {1900965600 10800 1 EEST} + {1901052000 10800 1 EEST} {1919196000 7200 0 EET} - {1932415200 10800 1 EEST} + {1932501600 10800 1 EEST} {1950645600 7200 0 EET} - {1963864800 10800 1 EEST} + {1963951200 10800 1 EEST} {1982700000 7200 0 EET} - {1995314400 10800 1 EEST} + {1995400800 10800 1 EEST} {2014149600 7200 0 EET} - {2027368800 10800 1 EEST} + {2026850400 10800 1 EEST} {2045599200 7200 0 EET} - {2058818400 10800 1 EEST} + {2058300000 10800 1 EEST} {2077048800 7200 0 EET} - {2090268000 10800 1 EEST} + {2090354400 10800 1 EEST} {2108498400 7200 0 EET} - {2121717600 10800 1 EEST} - {2140552800 7200 0 EET} - {2153167200 10800 1 EEST} + {2121804000 10800 1 EEST} + {2139948000 7200 0 EET} + {2153253600 10800 1 EEST} {2172002400 7200 0 EET} - {2184616800 10800 1 EEST} + {2184703200 10800 1 EEST} {2203452000 7200 0 EET} - {2216671200 10800 1 EEST} + {2216152800 10800 1 EEST} {2234901600 7200 0 EET} - {2248120800 10800 1 EEST} + {2248207200 10800 1 EEST} {2266351200 7200 0 EET} - {2279570400 10800 1 EEST} + {2279656800 10800 1 EEST} {2297800800 7200 0 EET} - {2311020000 10800 1 EEST} - {2329855200 7200 0 EET} - {2342469600 10800 1 EEST} + {2311106400 10800 1 EEST} + {2329250400 7200 0 EET} + {2342556000 10800 1 EEST} {2361304800 7200 0 EET} - {2374524000 10800 1 EEST} + {2374005600 10800 1 EEST} {2392754400 7200 0 EET} - {2405973600 10800 1 EEST} + {2405455200 10800 1 EEST} {2424204000 7200 0 EET} - {2437423200 10800 1 EEST} + {2437509600 10800 1 EEST} {2455653600 7200 0 EET} - {2468872800 10800 1 EEST} - {2487708000 7200 0 EET} - {2500322400 10800 1 EEST} + {2468959200 10800 1 EEST} + {2487103200 7200 0 EET} + {2500408800 10800 1 EEST} {2519157600 7200 0 EET} - {2531772000 10800 1 EEST} + {2531858400 10800 1 EEST} {2550607200 7200 0 EET} - {2563826400 10800 1 EEST} + {2563308000 10800 1 EEST} {2582056800 7200 0 EET} - {2595276000 10800 1 EEST} + {2595362400 10800 1 EEST} {2613506400 7200 0 EET} - {2626725600 10800 1 EEST} + {2626812000 10800 1 EEST} {2644956000 7200 0 EET} - {2658175200 10800 1 EEST} - {2677010400 7200 0 EET} - {2689624800 10800 1 EEST} + {2658261600 10800 1 EEST} + {2676405600 7200 0 EET} + {2689711200 10800 1 EEST} {2708460000 7200 0 EET} - {2721679200 10800 1 EEST} + {2721160800 10800 1 EEST} {2739909600 7200 0 EET} - {2753128800 10800 1 EEST} + {2752610400 10800 1 EEST} {2771359200 7200 0 EET} - {2784578400 10800 1 EEST} + {2784664800 10800 1 EEST} {2802808800 7200 0 EET} - {2816028000 10800 1 EEST} + {2816114400 10800 1 EEST} {2834258400 7200 0 EET} - {2847477600 10800 1 EEST} + {2847564000 10800 1 EEST} {2866312800 7200 0 EET} - {2878927200 10800 1 EEST} + {2879013600 10800 1 EEST} {2897762400 7200 0 EET} - {2910981600 10800 1 EEST} + {2910463200 10800 1 EEST} {2929212000 7200 0 EET} - {2942431200 10800 1 EEST} + {2941912800 10800 1 EEST} {2960661600 7200 0 EET} - {2973880800 10800 1 EEST} + {2973967200 10800 1 EEST} {2992111200 7200 0 EET} - {3005330400 10800 1 EEST} - {3024165600 7200 0 EET} - {3036780000 10800 1 EEST} + {3005416800 10800 1 EEST} + {3023560800 7200 0 EET} + {3036866400 10800 1 EEST} {3055615200 7200 0 EET} - {3068229600 10800 1 EEST} + {3068316000 10800 1 EEST} {3087064800 7200 0 EET} - {3100284000 10800 1 EEST} + {3099765600 10800 1 EEST} {3118514400 7200 0 EET} - {3131733600 10800 1 EEST} + {3131820000 10800 1 EEST} {3149964000 7200 0 EET} - {3163183200 10800 1 EEST} + {3163269600 10800 1 EEST} {3181413600 7200 0 EET} - {3194632800 10800 1 EEST} - {3213468000 7200 0 EET} - {3226082400 10800 1 EEST} + {3194719200 10800 1 EEST} + {3212863200 7200 0 EET} + {3226168800 10800 1 EEST} {3244917600 7200 0 EET} - {3258136800 10800 1 EEST} + {3257618400 10800 1 EEST} {3276367200 7200 0 EET} - {3289586400 10800 1 EEST} + {3289068000 10800 1 EEST} {3307816800 7200 0 EET} - {3321036000 10800 1 EEST} + {3321122400 10800 1 EEST} {3339266400 7200 0 EET} - {3352485600 10800 1 EEST} - {3371320800 7200 0 EET} - {3383935200 10800 1 EEST} + {3352572000 10800 1 EEST} + {3370716000 7200 0 EET} + {3384021600 10800 1 EEST} {3402770400 7200 0 EET} - {3415384800 10800 1 EEST} + {3415471200 10800 1 EEST} {3434220000 7200 0 EET} - {3447439200 10800 1 EEST} + {3446920800 10800 1 EEST} {3465669600 7200 0 EET} - {3478888800 10800 1 EEST} + {3478975200 10800 1 EEST} {3497119200 7200 0 EET} - {3510338400 10800 1 EEST} + {3510424800 10800 1 EEST} {3528568800 7200 0 EET} - {3541788000 10800 1 EEST} - {3560623200 7200 0 EET} - {3573237600 10800 1 EEST} + {3541874400 10800 1 EEST} + {3560018400 7200 0 EET} + {3573324000 10800 1 EEST} {3592072800 7200 0 EET} - {3605292000 10800 1 EEST} + {3604773600 10800 1 EEST} {3623522400 7200 0 EET} - {3636741600 10800 1 EEST} + {3636223200 10800 1 EEST} {3654972000 7200 0 EET} - {3668191200 10800 1 EEST} + {3668277600 10800 1 EEST} {3686421600 7200 0 EET} - {3699640800 10800 1 EEST} + {3699727200 10800 1 EEST} {3717871200 7200 0 EET} - {3731090400 10800 1 EEST} + {3731176800 10800 1 EEST} {3749925600 7200 0 EET} - {3762540000 10800 1 EEST} + {3762626400 10800 1 EEST} {3781375200 7200 0 EET} - {3794594400 10800 1 EEST} + {3794076000 10800 1 EEST} {3812824800 7200 0 EET} - {3826044000 10800 1 EEST} + {3825525600 10800 1 EEST} {3844274400 7200 0 EET} - {3857493600 10800 1 EEST} + {3857580000 10800 1 EEST} {3875724000 7200 0 EET} - {3888943200 10800 1 EEST} - {3907778400 7200 0 EET} - {3920392800 10800 1 EEST} + {3889029600 10800 1 EEST} + {3907173600 7200 0 EET} + {3920479200 10800 1 EEST} {3939228000 7200 0 EET} - {3951842400 10800 1 EEST} + {3951928800 10800 1 EEST} {3970677600 7200 0 EET} - {3983896800 10800 1 EEST} + {3983378400 10800 1 EEST} {4002127200 7200 0 EET} - {4015346400 10800 1 EEST} + {4015432800 10800 1 EEST} {4033576800 7200 0 EET} - {4046796000 10800 1 EEST} + {4046882400 10800 1 EEST} {4065026400 7200 0 EET} - {4078245600 10800 1 EEST} - {4097080800 7200 0 EET} + {4078332000 10800 1 EEST} + {4096476000 7200 0 EET} } diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron index fe8f7e1..aa028d8 100644 --- a/library/tzdata/Asia/Hebron +++ b/library/tzdata/Asia/Hebron @@ -109,7 +109,7 @@ set TZData(:Asia/Hebron) { {1395957600 10800 1 EEST} {1414098000 7200 0 EET} {1427493600 10800 1 EEST} - {1445547600 7200 0 EET} + {1445551200 7200 0 EET} {1458946800 10800 1 EEST} {1477692000 7200 0 EET} {1490396400 10800 1 EEST} @@ -117,165 +117,165 @@ set TZData(:Asia/Hebron) { {1521846000 10800 1 EEST} {1540591200 7200 0 EET} {1553810400 10800 1 EEST} - {1572040800 7200 0 EET} - {1585260000 10800 1 EEST} - {1604095200 7200 0 EET} - {1616709600 10800 1 EEST} + {1572037200 7200 0 EET} + {1585346400 10800 1 EEST} + {1603490400 7200 0 EET} + {1616796000 10800 1 EEST} {1635544800 7200 0 EET} - {1648159200 10800 1 EEST} + {1648245600 10800 1 EEST} {1666994400 7200 0 EET} - {1680213600 10800 1 EEST} + {1679695200 10800 1 EEST} {1698444000 7200 0 EET} - {1711663200 10800 1 EEST} + {1711749600 10800 1 EEST} {1729893600 7200 0 EET} - {1743112800 10800 1 EEST} + {1743199200 10800 1 EEST} {1761343200 7200 0 EET} - {1774562400 10800 1 EEST} - {1793397600 7200 0 EET} - {1806012000 10800 1 EEST} + {1774648800 10800 1 EEST} + {1792792800 7200 0 EET} + {1806098400 10800 1 EEST} {1824847200 7200 0 EET} - {1838066400 10800 1 EEST} + {1837548000 10800 1 EEST} {1856296800 7200 0 EET} - {1869516000 10800 1 EEST} + {1868997600 10800 1 EEST} {1887746400 7200 0 EET} - {1900965600 10800 1 EEST} + {1901052000 10800 1 EEST} {1919196000 7200 0 EET} - {1932415200 10800 1 EEST} + {1932501600 10800 1 EEST} {1950645600 7200 0 EET} - {1963864800 10800 1 EEST} + {1963951200 10800 1 EEST} {1982700000 7200 0 EET} - {1995314400 10800 1 EEST} + {1995400800 10800 1 EEST} {2014149600 7200 0 EET} - {2027368800 10800 1 EEST} + {2026850400 10800 1 EEST} {2045599200 7200 0 EET} - {2058818400 10800 1 EEST} + {2058300000 10800 1 EEST} {2077048800 7200 0 EET} - {2090268000 10800 1 EEST} + {2090354400 10800 1 EEST} {2108498400 7200 0 EET} - {2121717600 10800 1 EEST} - {2140552800 7200 0 EET} - {2153167200 10800 1 EEST} + {2121804000 10800 1 EEST} + {2139948000 7200 0 EET} + {2153253600 10800 1 EEST} {2172002400 7200 0 EET} - {2184616800 10800 1 EEST} + {2184703200 10800 1 EEST} {2203452000 7200 0 EET} - {2216671200 10800 1 EEST} + {2216152800 10800 1 EEST} {2234901600 7200 0 EET} - {2248120800 10800 1 EEST} + {2248207200 10800 1 EEST} {2266351200 7200 0 EET} - {2279570400 10800 1 EEST} + {2279656800 10800 1 EEST} {2297800800 7200 0 EET} - {2311020000 10800 1 EEST} - {2329855200 7200 0 EET} - {2342469600 10800 1 EEST} + {2311106400 10800 1 EEST} + {2329250400 7200 0 EET} + {2342556000 10800 1 EEST} {2361304800 7200 0 EET} - {2374524000 10800 1 EEST} + {2374005600 10800 1 EEST} {2392754400 7200 0 EET} - {2405973600 10800 1 EEST} + {2405455200 10800 1 EEST} {2424204000 7200 0 EET} - {2437423200 10800 1 EEST} + {2437509600 10800 1 EEST} {2455653600 7200 0 EET} - {2468872800 10800 1 EEST} - {2487708000 7200 0 EET} - {2500322400 10800 1 EEST} + {2468959200 10800 1 EEST} + {2487103200 7200 0 EET} + {2500408800 10800 1 EEST} {2519157600 7200 0 EET} - {2531772000 10800 1 EEST} + {2531858400 10800 1 EEST} {2550607200 7200 0 EET} - {2563826400 10800 1 EEST} + {2563308000 10800 1 EEST} {2582056800 7200 0 EET} - {2595276000 10800 1 EEST} + {2595362400 10800 1 EEST} {2613506400 7200 0 EET} - {2626725600 10800 1 EEST} + {2626812000 10800 1 EEST} {2644956000 7200 0 EET} - {2658175200 10800 1 EEST} - {2677010400 7200 0 EET} - {2689624800 10800 1 EEST} + {2658261600 10800 1 EEST} + {2676405600 7200 0 EET} + {2689711200 10800 1 EEST} {2708460000 7200 0 EET} - {2721679200 10800 1 EEST} + {2721160800 10800 1 EEST} {2739909600 7200 0 EET} - {2753128800 10800 1 EEST} + {2752610400 10800 1 EEST} {2771359200 7200 0 EET} - {2784578400 10800 1 EEST} + {2784664800 10800 1 EEST} {2802808800 7200 0 EET} - {2816028000 10800 1 EEST} + {2816114400 10800 1 EEST} {2834258400 7200 0 EET} - {2847477600 10800 1 EEST} + {2847564000 10800 1 EEST} {2866312800 7200 0 EET} - {2878927200 10800 1 EEST} + {2879013600 10800 1 EEST} {2897762400 7200 0 EET} - {2910981600 10800 1 EEST} + {2910463200 10800 1 EEST} {2929212000 7200 0 EET} - {2942431200 10800 1 EEST} + {2941912800 10800 1 EEST} {2960661600 7200 0 EET} - {2973880800 10800 1 EEST} + {2973967200 10800 1 EEST} {2992111200 7200 0 EET} - {3005330400 10800 1 EEST} - {3024165600 7200 0 EET} - {3036780000 10800 1 EEST} + {3005416800 10800 1 EEST} + {3023560800 7200 0 EET} + {3036866400 10800 1 EEST} {3055615200 7200 0 EET} - {3068229600 10800 1 EEST} + {3068316000 10800 1 EEST} {3087064800 7200 0 EET} - {3100284000 10800 1 EEST} + {3099765600 10800 1 EEST} {3118514400 7200 0 EET} - {3131733600 10800 1 EEST} + {3131820000 10800 1 EEST} {3149964000 7200 0 EET} - {3163183200 10800 1 EEST} + {3163269600 10800 1 EEST} {3181413600 7200 0 EET} - {3194632800 10800 1 EEST} - {3213468000 7200 0 EET} - {3226082400 10800 1 EEST} + {3194719200 10800 1 EEST} + {3212863200 7200 0 EET} + {3226168800 10800 1 EEST} {3244917600 7200 0 EET} - {3258136800 10800 1 EEST} + {3257618400 10800 1 EEST} {3276367200 7200 0 EET} - {3289586400 10800 1 EEST} + {3289068000 10800 1 EEST} {3307816800 7200 0 EET} - {3321036000 10800 1 EEST} + {3321122400 10800 1 EEST} {3339266400 7200 0 EET} - {3352485600 10800 1 EEST} - {3371320800 7200 0 EET} - {3383935200 10800 1 EEST} + {3352572000 10800 1 EEST} + {3370716000 7200 0 EET} + {3384021600 10800 1 EEST} {3402770400 7200 0 EET} - {3415384800 10800 1 EEST} + {3415471200 10800 1 EEST} {3434220000 7200 0 EET} - {3447439200 10800 1 EEST} + {3446920800 10800 1 EEST} {3465669600 7200 0 EET} - {3478888800 10800 1 EEST} + {3478975200 10800 1 EEST} {3497119200 7200 0 EET} - {3510338400 10800 1 EEST} + {3510424800 10800 1 EEST} {3528568800 7200 0 EET} - {3541788000 10800 1 EEST} - {3560623200 7200 0 EET} - {3573237600 10800 1 EEST} + {3541874400 10800 1 EEST} + {3560018400 7200 0 EET} + {3573324000 10800 1 EEST} {3592072800 7200 0 EET} - {3605292000 10800 1 EEST} + {3604773600 10800 1 EEST} {3623522400 7200 0 EET} - {3636741600 10800 1 EEST} + {3636223200 10800 1 EEST} {3654972000 7200 0 EET} - {3668191200 10800 1 EEST} + {3668277600 10800 1 EEST} {3686421600 7200 0 EET} - {3699640800 10800 1 EEST} + {3699727200 10800 1 EEST} {3717871200 7200 0 EET} - {3731090400 10800 1 EEST} + {3731176800 10800 1 EEST} {3749925600 7200 0 EET} - {3762540000 10800 1 EEST} + {3762626400 10800 1 EEST} {3781375200 7200 0 EET} - {3794594400 10800 1 EEST} + {3794076000 10800 1 EEST} {3812824800 7200 0 EET} - {3826044000 10800 1 EEST} + {3825525600 10800 1 EEST} {3844274400 7200 0 EET} - {3857493600 10800 1 EEST} + {3857580000 10800 1 EEST} {3875724000 7200 0 EET} - {3888943200 10800 1 EEST} - {3907778400 7200 0 EET} - {3920392800 10800 1 EEST} + {3889029600 10800 1 EEST} + {3907173600 7200 0 EET} + {3920479200 10800 1 EEST} {3939228000 7200 0 EET} - {3951842400 10800 1 EEST} + {3951928800 10800 1 EEST} {3970677600 7200 0 EET} - {3983896800 10800 1 EEST} + {3983378400 10800 1 EEST} {4002127200 7200 0 EET} - {4015346400 10800 1 EEST} + {4015432800 10800 1 EEST} {4033576800 7200 0 EET} - {4046796000 10800 1 EEST} + {4046882400 10800 1 EEST} {4065026400 7200 0 EET} - {4078245600 10800 1 EEST} - {4097080800 7200 0 EET} + {4078332000 10800 1 EEST} + {4096476000 7200 0 EET} } diff --git a/library/tzdata/Europe/Budapest b/library/tzdata/Europe/Budapest index e660ad1..4b92c5f 100644 --- a/library/tzdata/Europe/Budapest +++ b/library/tzdata/Europe/Budapest @@ -2,17 +2,19 @@ set TZData(:Europe/Budapest) { {-9223372036854775808 4580 0 LMT} - {-2500938980 3600 0 CET} + {-2498260580 3600 0 CET} {-1693706400 7200 1 CEST} {-1680483600 3600 0 CET} {-1663455600 7200 1 CEST} {-1650150000 3600 0 CET} {-1640998800 3600 0 CET} - {-1633212000 7200 1 CEST} + {-1632006000 7200 1 CEST} {-1618700400 3600 0 CET} - {-1600466400 7200 1 CEST} - {-1581202800 3600 0 CET} - {-906771600 3600 0 CET} + {-1600470000 7200 1 CEST} + {-1587250800 3600 0 CET} + {-1569711600 7200 1 CEST} + {-1555196400 3600 0 CET} + {-906775200 3600 0 CET} {-857257200 3600 0 CET} {-844556400 7200 1 CEST} {-828226800 3600 0 CET} @@ -20,33 +22,32 @@ set TZData(:Europe/Budapest) { {-796777200 3600 0 CET} {-788922000 3600 0 CET} {-778471200 7200 1 CEST} - {-762660000 3600 0 CET} + {-762656400 3600 0 CET} {-749689200 7200 1 CEST} - {-733359600 3600 0 CET} + {-733276800 3600 0 CET} {-717634800 7200 1 CEST} {-701910000 3600 0 CET} {-686185200 7200 1 CEST} {-670460400 3600 0 CET} {-654130800 7200 1 CEST} {-639010800 3600 0 CET} - {-621990000 7200 1 CEST} - {-605660400 3600 0 CET} {-492656400 7200 1 CEST} {-481168800 3600 0 CET} - {-461120400 7200 1 CEST} - {-449632800 3600 0 CET} - {-428547600 7200 1 CEST} - {-418269600 3600 0 CET} - {-397094400 7200 1 CEST} + {-461199600 7200 1 CEST} + {-449708400 3600 0 CET} + {-428540400 7200 1 CEST} + {-418258800 3600 0 CET} + {-397090800 7200 1 CEST} {-386809200 3600 0 CET} - {323827200 7200 1 CEST} - {338950800 3600 0 CET} - {354675600 7200 1 CEST} - {370400400 3600 0 CET} - {386125200 7200 1 CEST} - {401850000 3600 0 CET} - {417574800 7200 1 CEST} - {433299600 3600 0 CET} + {323823600 7200 1 CEST} + {338943600 3600 0 CET} + {354668400 7200 1 CEST} + {370393200 3600 0 CET} + {386118000 7200 1 CEST} + {401842800 3600 0 CET} + {417567600 7200 1 CEST} + {433292400 3600 0 CET} + {441759600 3600 0 CET} {449024400 7200 1 CEST} {465354000 3600 0 CET} {481078800 7200 1 CEST} diff --git a/library/tzdata/Europe/Monaco b/library/tzdata/Europe/Monaco index f887b0b..7428b2f 100644 --- a/library/tzdata/Europe/Monaco +++ b/library/tzdata/Europe/Monaco @@ -2,8 +2,8 @@ set TZData(:Europe/Monaco) { {-9223372036854775808 1772 0 LMT} - {-2486680172 561 0 PMT} - {-1855958961 0 0 WET} + {-2448318572 561 0 PMT} + {-1854403761 0 0 WET} {-1689814800 3600 1 WEST} {-1680397200 0 0 WET} {-1665363600 3600 1 WEST} diff --git a/library/tzdata/Europe/Paris b/library/tzdata/Europe/Paris index 4b22a09..7208e55 100644 --- a/library/tzdata/Europe/Paris +++ b/library/tzdata/Europe/Paris @@ -2,8 +2,8 @@ set TZData(:Europe/Paris) { {-9223372036854775808 561 0 LMT} - {-2486678901 561 0 PMT} - {-1855958901 0 0 WET} + {-2486592561 561 0 PMT} + {-1855958961 0 0 WET} {-1689814800 3600 1 WEST} {-1680397200 0 0 WET} {-1665363600 3600 1 WEST} diff --git a/library/tzdata/Pacific/Fiji b/library/tzdata/Pacific/Fiji index e316b93..a062913 100644 --- a/library/tzdata/Pacific/Fiji +++ b/library/tzdata/Pacific/Fiji @@ -29,7 +29,7 @@ set TZData(:Pacific/Fiji) { {1547301600 43200 0 +12} {1573308000 46800 1 +12} {1578751200 43200 0 +12} - {1604757600 46800 1 +12} + {1608386400 46800 1 +12} {1610805600 43200 0 +12} {1636812000 46800 1 +12} {1642255200 43200 0 +12} -- cgit v0.12 From dc84eca339d2be8913965c070a8e99e532326934 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 29 Oct 2020 09:42:42 +0000 Subject: 3 new testcases --- tests/string.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/string.test b/tests/string.test index b5efc8c..11c1952 100644 --- a/tests/string.test +++ b/tests/string.test @@ -141,6 +141,18 @@ test string-2.33 {string compare, high bit} { proc foo {} {string compare "\x00\x00" "\x00\x01"} foo } -1 +test string-2.34 {string compare, binary equal} { + proc foo {} {string compare [binary format a100 0] [binary format a100 0]} + foo +} 0 +test string-2.35 {string compare, binary neq} { + proc foo {} {string compare [binary format a100a 0 1] [binary format a100a 0 0]} + foo +} 1 +test string-2.36 {string compare, binary neq unequal length} { + proc foo {} {string compare [binary format a20a 0 1] [binary format a100a 0 0]} + foo +} 1 # only need a few tests on equal, since it uses the same code as # string compare, but just modifies the return output -- cgit v0.12 From 076a7e2839881c03d0a98a8fc50823aef42ad79a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 30 Oct 2020 13:27:52 +0000 Subject: Add "{}" around many "expr" commands in testcases. Also in doc/expr.n --- doc/expr.n | 9 +- tests/append.test | 4 +- tests/appendComp.test | 4 +- tests/autoMkindex.test | 4 +- tests/basic.test | 2 +- tests/chanio.test | 20 +- tests/clock.test | 6 +- tests/cmdAH.test | 2 +- tests/cmdIL.test | 2 +- tests/compExpr.test | 4 +- tests/compile.test | 32 +-- tests/exec.test | 3 - tests/execute.test | 30 +-- tests/for-old.test | 14 +- tests/for.test | 62 +++--- tests/history.test | 18 +- tests/http.test | 2 +- tests/httpold.test | 2 +- tests/if.test | 48 ++--- tests/info.test | 10 +- tests/interp.test | 44 ++--- tests/io.test | 6 +- tests/list.test | 14 +- tests/load.test | 120 +++++------ tests/lsearch.test | 2 +- tests/lsetComp.test | 506 +++++++++++++++++++++++------------------------ tests/mathop.test | 6 +- tests/namespace-old.test | 4 +- tests/oo.test | 8 +- tests/opt.test | 4 +- tests/parse.test | 4 +- tests/parseOld.test | 2 +- tests/pkgMkIndex.test | 12 +- tests/proc-old.test | 12 +- tests/proc.test | 2 +- tests/pwd.test | 5 +- tests/remote.tcl | 8 +- tests/socket.test | 4 +- tests/subst.test | 12 +- tests/tcltest.test | 2 +- tests/trace.test | 64 +++--- tests/uplevel.test | 10 +- tests/var.test | 2 +- tests/while-old.test | 8 +- tests/while.test | 44 ++--- tests/winDde.test | 6 +- tests/zlib.test | 8 +- 47 files changed, 600 insertions(+), 597 deletions(-) diff --git a/doc/expr.n b/doc/expr.n index 1fd4c4e..42da868 100644 --- a/doc/expr.n +++ b/doc/expr.n @@ -107,9 +107,9 @@ will produce the value on the right side of the line: .PP .CS .ta 9c -\fBexpr\fR 3.1 + $a \fI6.1\fR -\fBexpr\fR 2 + "$a.$b" \fI5.6\fR -\fBexpr\fR 4*[llength "6 2"] \fI8\fR +\fBexpr\fR {3.1 + $a} \fI6.1\fR +\fBexpr\fR {2 + "$a.$b"} \fI5.6\fR +\fBexpr\fR {4*[llength "6 2"]} \fI8\fR \fBexpr\fR {{word one} < "word $a"} \fI0\fR .CE .SS OPERATORS @@ -246,7 +246,7 @@ just as in C, which means that operands are not evaluated if they are not needed to determine the outcome. For example, in the command .PP .CS -\fBexpr\fR {$v ? [a] : [b]} +\fBexpr\fR {$v?[a]:[b]} .CE .PP only one of @@ -496,4 +496,5 @@ Copyright (c) 2005 by Kevin B. Kenny . All rights reserved. .fi '\" Local Variables: '\" mode: nroff +'\" fill-column: 78 '\" End: diff --git a/tests/append.test b/tests/append.test index ef4a194..0b06c8f 100644 --- a/tests/append.test +++ b/tests/append.test @@ -32,7 +32,7 @@ test append-1.3 {append command} { test append-2.1 {long appends} { set x "" - for {set i 0} {$i < 1000} {set i [expr $i+1]} { + for {set i 0} {$i < 1000} {incr i} { append x "foobar " } set y "foobar" @@ -158,7 +158,7 @@ test append-5.1 {long lappends} -setup { if {$l != $size} { return "length mismatch: should have been $size, was $l" } - for {set i 0} {$i < $size} {set i [expr $i+1]} { + for {set i 0} {$i < $size} {incr i} { set j [lindex $var $i] if {$j ne "item $i"} { return "element $i should have been \"item $i\", was \"$j\"" diff --git a/tests/appendComp.test b/tests/appendComp.test index 66941a9..a6e78d2 100644 --- a/tests/appendComp.test +++ b/tests/appendComp.test @@ -41,7 +41,7 @@ test appendComp-1.3 {append command} { test appendComp-2.1 {long appends} { proc foo {} { set x "" - for {set i 0} {$i < 1000} {set i [expr $i+1]} { + for {set i 0} {$i < 1000} {incr i} { append x "foobar " } set y "foobar" @@ -223,7 +223,7 @@ test appendComp-5.1 {long lappends} -setup { } } -body { set x "" - for {set i 0} {$i < 300} {set i [expr $i+1]} { + for {set i 0} {$i < 300} {incr i} { lappend x "item $i" } check $x 300 diff --git a/tests/autoMkindex.test b/tests/autoMkindex.test index 6c57de0..6adb403 100644 --- a/tests/autoMkindex.test +++ b/tests/autoMkindex.test @@ -40,8 +40,8 @@ namespace import -force blt::* # Should be able to handle "proc" definitions, even if they are preceded by # white space. -proc normal {x y} {return [expr $x+$y]} - proc indented {x y} {return [expr $x+$y]} +proc normal {x y} {return [expr {$x+$y}]} + proc indented {x y} {return [expr {$x+$y}]} # # Should be able to handle proc declarations within namespaces, even if they diff --git a/tests/basic.test b/tests/basic.test index 6f8d350..bf2b08f 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -674,7 +674,7 @@ proc l3 {} { # Do all tests once byte compiled and once with direct string evaluation for {set noComp 0} {$noComp <= 1} {incr noComp} { -if $noComp { +if {$noComp} { interp alias {} run {} testevalex set constraints testevalex } else { diff --git a/tests/chanio.test b/tests/chanio.test index c811b00..58116ba 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -3045,7 +3045,7 @@ test chan-io-30.13 {Tcl_Write crlf on block boundary, Tcl_Read auto} -setup { string length [chan read $f] } -cleanup { chan close $f -} -result [expr 700*15+1] +} -result [expr {700*15 + 1}] test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup { file delete $path(test1) } -body { @@ -3062,7 +3062,7 @@ test chan-io-30.14 {Tcl_Write crlf on block boundary, Tcl_Read crlf} -setup { string length [chan read $f] } -cleanup { chan close $f -} -result [expr 700*15+1] +} -result [expr {700*15 + 1}] test chan-io-30.15 {Tcl_Write mixed, Tcl_Read auto} -setup { file delete $path(test1) } -body { @@ -3904,7 +3904,7 @@ test chan-io-31.31 {Tcl_Write crlf on block boundary, Tcl_Gets crlf} -setup { } chan close $f string length $c -} -result [expr 700*15+1] +} -result [expr {700*15 + 1}] test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup { file delete $path(test1) set c "" @@ -3924,7 +3924,7 @@ test chan-io-31.32 {Tcl_Write crlf on block boundary, Tcl_Gets auto} -setup { } chan close $f string length $c -} -result [expr 700*15+1] +} -result [expr {700*15 + 1}] # Test Tcl_Read and buffering. @@ -5335,7 +5335,7 @@ test chan-io-40.2 {POSIX open access modes: CREAT} -setup { } -constraints {unix} -body { set f [open $path(test3) {WRONLY CREAT} 0600] file stat $path(test3) stats - set x [format "%#o" [expr $stats(mode)&0o777]] + set x [format "%#o" [expr {$stats(mode) & 0o777}]] chan puts $f "line 1" chan close $f set f [open $path(test3) r] @@ -5349,7 +5349,7 @@ test chan-io-40.3 {POSIX open access modes: CREAT} -setup { # This test only works if your umask is 2, like ouster's. chan close [open $path(test3) {WRONLY CREAT}] file stat $path(test3) stats - format "%#o" [expr $stats(mode)&0o777] + format "%#o" [expr {$stats(mode) & 0o777}] } -result [format %#4o [expr {0o666 & ~ $umaskValue}]] test chan-io-40.4 {POSIX open access modes: CREAT} -setup { file delete $path(test3) @@ -6716,7 +6716,7 @@ test chan-io-52.6 {TclCopyChannel} -setup { set f2 [open $path(test1) w] chan configure $f1 -translation lf -blocking 0 chan configure $f2 -translation lf -blocking 0 - set s0 [chan copy $f1 $f2 -size [expr [file size $thisScript] + 5]] + set s0 [chan copy $f1 $f2 -size [expr {[file size $thisScript] + 5}]] set result [list [chan configure $f1 -blocking] [chan configure $f2 -blocking]] chan close $f1 chan close $f2 @@ -6958,7 +6958,7 @@ test chan-io-53.5 {CopyData: error during chan copy} {socket fcopy} { chan close $listen ;# This means the socket open never really succeeds chan copy $in $out -command [namespace code FcopyTestDone] variable fcopyTestDone - if ![info exists fcopyTestDone] { + if {![info exists fcopyTestDone]} { vwait [namespace which -variable fcopyTestDone] ;# The error occurs here in the b.g. } chan close $in @@ -6978,7 +6978,7 @@ test chan-io-53.6 {CopyData: error during chan copy} -setup { set out [open $path(test1) w] chan copy $in $out -command [namespace code FcopyTestDone] variable fcopyTestDone - if ![info exists fcopyTestDone] { + if {![info exists fcopyTestDone]} { vwait [namespace which -variable fcopyTestDone] } return $fcopyTestDone ;# 0 for plain end of file @@ -7031,7 +7031,7 @@ test chan-io-53.7 {CopyData: Flooding chan copy from pipe} -setup { vwait [namespace which -variable fcopyTestDone] } # -1=error 0=script error N=number of bytes - expr ($fcopyTestDone == 0) ? $fcopyTestCount : -1 + expr {($fcopyTestDone == 0) ? $fcopyTestCount : -1} } -cleanup { catch {chan close $in} chan close $out diff --git a/tests/clock.test b/tests/clock.test index 6d502d4..db43a67 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -35440,7 +35440,7 @@ test clock-32.1 {scan/format across the Gregorian change} { # clock clicks test clock-33.1 {clock clicks tests} { - expr [clock clicks]+1 + expr {[clock clicks] + 1} concat {} } {} test clock-33.2 {clock clicks tests} { @@ -35453,7 +35453,7 @@ test clock-33.3 {clock clicks tests} { list [catch {clock clicks foo} msg] $msg } {1 {bad option "foo": must be -milliseconds or -microseconds}} test clock-33.4 {clock clicks tests} { - expr [clock clicks -milliseconds]+1 + expr {[clock clicks -milliseconds] + 1} concat {} } {} test clock-33.4a {clock milliseconds} { @@ -35909,7 +35909,7 @@ test clock-34.68 {clock scan tests (merid and TZ)} { # clock seconds test clock-35.1 {clock seconds tests} { - expr [clock seconds]+1 + expr {[clock seconds] + 1} concat {} } {} test clock-35.2 {clock seconds tests} { diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 3809f23..d64ebbb 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -1092,7 +1092,7 @@ test cmdAH-23.4 {Tcl_FileObjCmd: lstat} -setup { unset -nocomplain stat } -constraints {unix nonPortable} -body { file lstat $linkfile stat - list $stat(nlink) [expr $stat(mode)&0777] $stat(type) + list $stat(nlink) [expr {$stat(mode) & 0o777}] $stat(type) } -result {1 511 link} test cmdAH-23.5 {Tcl_FileObjCmd: lstat errors} {nonPortable} { list [catch {file lstat _bogus_ stat} msg] [string tolower $msg] \ diff --git a/tests/cmdIL.test b/tests/cmdIL.test index 27f1df1..06171e4 100644 --- a/tests/cmdIL.test +++ b/tests/cmdIL.test @@ -498,7 +498,7 @@ test cmdIL-5.5 {lsort with list style index and sharing} -body { foreach e $l {lappend n [list [expr {rand()}] $e]} lindex [lsort -real -index $l $n] 1 1 } - expr srand(1) + expr {srand(1)} test_lsort 0 } -result 0 -cleanup { rename test_lsort "" diff --git a/tests/compExpr.test b/tests/compExpr.test index d3f1345..7257726 100644 --- a/tests/compExpr.test +++ b/tests/compExpr.test @@ -314,7 +314,7 @@ test compExpr-4.9 {CompileCondExpr procedure, error in "false" clause} { } {0 15} test compExpr-5.1 {CompileMathFuncCall procedure, math function found} { - format %.6g [expr atan2(1.0, 2.0)] + format %.6g [expr {atan2(1.0, 2.0)}] } 0.463648 test compExpr-5.2 {CompileMathFuncCall procedure, math function not found} -body { expr {do_it()} @@ -329,7 +329,7 @@ test compExpr-5.5 {CompileMathFuncCall procedure, not enough arguments} -body { expr {atan2(1.0)} } -returnCodes error -match glob -result {not enough arguments for math function*} test compExpr-5.6 {CompileMathFuncCall procedure, complex argument} { - format %.6g [expr pow(2.1, 27.5-(24.4*(5%2)))] + format %.6g [expr {pow(2.1, 27.5-(24.4*(5%2)))}] } 9.97424 test compExpr-5.7 {CompileMathFuncCall procedure, error in argument} -body { expr {sinh(2.*)} diff --git a/tests/compile.test b/tests/compile.test index 0663270..4a65330 100644 --- a/tests/compile.test +++ b/tests/compile.test @@ -124,7 +124,7 @@ test compile-3.4 {TclCompileCatchCmd: bcc'ed [return] is caught} { proc foo {} { set fail [catch { return 1 - }] ; # {} + }] ; # {} return 2 } foo @@ -134,8 +134,8 @@ test compile-3.5 {TclCompileCatchCmd: recover from error, [Bug 705406]} { catch { if {[a]} { if b {} - } - } + } + } } list [catch foo msg] $msg } {0 1} @@ -203,7 +203,7 @@ test compile-4.1 {TclCompileForCmd: command substituted test expression} { set i 0 set j 0 # Should be "forever" - for {} [expr $i < 3] {} { + for {} [expr {$i < 3}] {} { set j [incr i] if {$j > 3} break } @@ -277,7 +277,7 @@ test compile-7.1 {TclCompileWhileCmd: command substituted test expression} { set i 0 set j 0 # Should be "forever" - while [expr $i < 3] { + while [expr {$i < 3}] { set j [incr i] if {$j > 3} break } @@ -336,7 +336,7 @@ test compile-11.6 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body { apply {{} { set r [list foobar] ; incr}} } -returnCodes error -result {wrong # args: should be "incr varName ?increment?"} test compile-11.7 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body { - apply {{} { set r [list foobar] ; expr !a }} + apply {{} { set r [list foobar] ; expr [concat !a] }} } -returnCodes error -match glob -result * test compile-11.8 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body { apply {{} { set r [list foobar] ; expr {!a} }} @@ -346,13 +346,13 @@ test compile-11.9 {Tcl_Append*: ensure Tcl_ResetResult is used properly} -body { list [catch {p} msg] $msg } -returnCodes error -result {unmatched open brace in list} -# +# # Special section for tests of tclLiteral.c # The following tests check for incorrect memory handling in # TclReleaseLiteral. They are only effective when tcl is compiled with # TCL_MEM_DEBUG # -# Special test for leak on interp delete [Bug 467523]. +# Special test for leak on interp delete [Bug 467523]. test compile-12.1 {testing literal leak on interp delete} -setup { proc getbytes {} { set lines [split [memory info] "\n"] @@ -361,10 +361,10 @@ test compile-12.1 {testing literal leak on interp delete} -setup { } -constraints memory -body { set end [getbytes] for {set i 0} {$i < 5} {incr i} { - interp create foo - foo eval { + interp create foo + foo eval { namespace eval bar {} - } + } interp delete foo set tmp $end set end [getbytes] @@ -385,7 +385,7 @@ test compile-12.2 {testing error on literal deletion} -constraints {memory exec} } puts 0 } source.file] - exec [interpreter] $sourceFile + exec [interpreter] $sourceFile } -cleanup { catch {removeFile $sourceFile} } -result 0 @@ -510,7 +510,7 @@ test compile-13.3 {TclCompileScript: testing check of max depth by nested script ti eval {set result {}} } -body { # Test different compilation variants (instructions evalStk, invokeStk, etc), - # with 500 nested scripts (bodies). It must generate "too many nested compilations" + # with 500 nested scripts (bodies). It must generate "too many nested compilations" # error for any variant we're testing here: ti eval {foreach cmd {eval "if 1" try catch} { set c [gencode 500 $cmd] @@ -518,7 +518,7 @@ test compile-13.3 {TclCompileScript: testing check of max depth by nested script }} #puts $errors # all of nested calls exceed the limit, so must end with "too many nested compilations" - # (or evaluations, depending on compile method/instruction and "mixed" compile within + # (or evaluations, depending on compile method/instruction and "mixed" compile within # evaliation), so no one succeeds, the result must be empty: ti eval {set result} } -result {} @@ -539,7 +539,7 @@ test compile-14.1 {testing errors in element name; segfault?} {} { test compile-14.2 {testing element name "$"} -body { unset -nocomplain a set a() 1 - set a(1) 2 + set a(1) 2 set a($) 3 list [set a()] [set a(1)] [set a($)] [unset a() a(1); lindex [array names a] 0] } -cleanup {unset a} -result [list 1 2 3 {$}] @@ -564,7 +564,7 @@ test compile-15.5 {proper TCL_RETURN code from [return]} { for {set noComp 0} {$noComp <= 1} {incr noComp} { -if $noComp { +if {$noComp} { interp alias {} run {} testevalex set constraints testevalex } else { diff --git a/tests/exec.test b/tests/exec.test index 3aaec6e..b07099b 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -707,9 +707,6 @@ test exec-20.1 {exec .CMD file} -constraints {win} -body { exec [makeFile "echo %1> $log" exec201.CMD] "Testing exec-20.1" viewFile $log } -result "\"Testing exec-20.1\"" - - - # ---------------------------------------------------------------------- # cleanup diff --git a/tests/execute.test b/tests/execute.test index 14c2f76..4b0f87f 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -821,49 +821,49 @@ test execute-7.10 {Wide int handling in INST_MOD} { expr {((wide(1)<<60)-1) % 0x400000000} } 17179869183 test execute-7.11 {Wide int handling in INST_LSHIFT} { - expr wide(42)<<30 + expr {wide(42) << 30} } 45097156608 test execute-7.12 {Wide int handling in INST_LSHIFT} { - expr 12345678901<<3 + expr {12345678901 << 3} } 98765431208 test execute-7.13 {Wide int handling in INST_RSHIFT} { - expr 0x543210febcda9876>>7 + expr {0x543210febcda9876 >> 7} } 47397893236700464 test execute-7.14 {Wide int handling in INST_RSHIFT} { - expr wide(0x9876543210febcda)>>7 + expr {wide(0x9876543210febcda) >> 7} } -58286587177206407 test execute-7.15 {Wide int handling in INST_BITOR} { - expr wide(0x9876543210febcda) | 0x543210febcda9876 + expr {wide(0x9876543210febcda) | 0x543210febcda9876} } -2560765885044310786 test execute-7.16 {Wide int handling in INST_BITXOR} { - expr wide(0x9876543210febcda) ^ 0x543210febcda9876 + expr {wide(0x9876543210febcda) ^ 0x543210febcda9876} } -3727778945703861076 test execute-7.17 {Wide int handling in INST_BITAND} { - expr wide(0x9876543210febcda) & 0x543210febcda9876 + expr {wide(0x9876543210febcda) & 0x543210febcda9876} } 1167013060659550290 test execute-7.18 {Wide int handling in INST_ADD} { - expr wide(0x7fffffff)+wide(0x7fffffff) + expr {wide(0x7fffffff) + wide(0x7fffffff)} } 4294967294 test execute-7.19 {Wide int handling in INST_ADD} { - expr 0x7fffffff+wide(0x7fffffff) + expr {0x7fffffff + wide(0x7fffffff)} } 4294967294 test execute-7.20 {Wide int handling in INST_ADD} { - expr wide(0x7fffffff)+0x7fffffff + expr {wide(0x7fffffff) + 0x7fffffff} } 4294967294 test execute-7.21 {Wide int handling in INST_ADD} { - expr double(0x7fffffff)+wide(0x7fffffff) + expr {double(0x7fffffff) + wide(0x7fffffff)} } 4294967294.0 test execute-7.22 {Wide int handling in INST_ADD} { - expr wide(0x7fffffff)+double(0x7fffffff) + expr {wide(0x7fffffff) + double(0x7fffffff)} } 4294967294.0 test execute-7.23 {Wide int handling in INST_SUB} { - expr 0x123456789a-0x20406080a + expr {0x123456789a - 0x20406080a} } 69530054800 test execute-7.24 {Wide int handling in INST_MULT} { - expr 0x123456789a*193 + expr {0x123456789a * 193} } 15090186251290 test execute-7.25 {Wide int handling in INST_DIV} { - expr 0x123456789a/193 + expr {0x123456789a / 193} } 405116546 test execute-7.26 {Wide int handling in INST_UPLUS} { set x 0x123456871234568 diff --git a/tests/for-old.test b/tests/for-old.test index d00a4ee..d68f05a 100644 --- a/tests/for-old.test +++ b/tests/for-old.test @@ -22,23 +22,23 @@ if {"::tcltest" ni [namespace children]} { catch {unset a i} test for-old-1.1 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { + for {set i 1} {$i<6} {set i [expr {$i+1}]} { set a [concat $a $i] } set a } {1 2 3 4 5} test for-old-1.2 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 continue + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} continue set a [concat $a $i] } set a } {1 2 3 5} test for-old-1.3 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 break + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} break set a [concat $a $i] } set a @@ -55,12 +55,12 @@ test for-old-1.7 {for tests} { } {wrong # args: should be "for start test next command"} test for-old-1.8 {for tests} { set a {xyz} - for {set i 1} {$i<6} {set i [expr $i+1]} {} + for {set i 1} {$i<6} {set i [expr {$i+1}]} {} set a } xyz test for-old-1.9 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]; if $i==4 break} { + for {set i 1} {$i<6} {set i [expr {$i+1}]; if {$i==4} break} { set a [concat $a $i] } set a diff --git a/tests/for.test b/tests/for.test index 65d8fc8..64ec22c 100644 --- a/tests/for.test +++ b/tests/for.test @@ -62,15 +62,15 @@ test for-1.8 {TclCompileForCmd: error compiling command body} -body { catch {unset a} test for-1.9 {TclCompileForCmd: simple command body} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 break + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} break set a [concat $a $i] } set a } {1 2 3} test for-1.10 {TclCompileForCmd: command body in quotes} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} "append a x" + for {set i 1} {$i<6} {set i [expr {$i+1}]} "append a x" set a } {xxxxx} test for-1.11 {TclCompileForCmd: computed command body} { @@ -81,7 +81,7 @@ test for-1.11 {TclCompileForCmd: computed command body} { set bb {break} set x2 {; append a x2} set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} $x1$bb$x2 + for {set i 1} {$i<6} {set i [expr {$i+1}]} $x1$bb$x2 set a } {x1} test for-1.12 {TclCompileForCmd: error in "next" command} -body { @@ -92,9 +92,9 @@ test for-1.12 {TclCompileForCmd: error in "next" command} -body { "set"*} test for-1.13 {TclCompileForCmd: long command body} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 break - if $i>5 continue + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -129,7 +129,7 @@ test for-1.14 {TclCompileForCmd: for command result} { set a } {} test for-1.15 {TclCompileForCmd: for command result} { - set a [for {set i 0} {$i < 5} {incr i} {if $i==3 break}] + set a [for {set i 0} {$i < 5} {incr i} {if {$i==3} break}] set a } {} @@ -144,7 +144,7 @@ test for-2.2 {TclCompileContinueCmd: continue result} { } 4 test for-2.3 {continue tests} { set a {} - for {set i 1} {$i <= 4} {set i [expr $i+1]} { + for {set i 1} {$i <= 4} {set i [expr {$i+1}]} { if {$i == 2} continue set a [concat $a $i] } @@ -152,7 +152,7 @@ test for-2.3 {continue tests} { } {1 3 4} test for-2.4 {continue tests} { set a {} - for {set i 1} {$i <= 4} {set i [expr $i+1]} { + for {set i 1} {$i <= 4} {set i [expr {$i+1}]} { if {$i != 2} continue set a [concat $a $i] } @@ -170,10 +170,10 @@ test for-2.5 {continue tests, nested loops} { } {1.1 1.2 2.1 3.1 4.1} test for-2.6 {continue tests, long command body} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==2 continue - if $i==4 break - if $i>5 continue + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==2} continue + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -246,10 +246,10 @@ test for-3.4 {break tests, nested loops} { } {1.1 1.2 2.1 3.1 4.1} test for-3.5 {break tests, long command body} { set a {} - for {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==2 continue - if $i==5 break - if $i>5 continue + for {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==2} continue + if {$i==5} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -265,7 +265,7 @@ test for-3.5 {break tests, long command body} { catch {incr i 5} msg catch {incr i -5} msg } - if $i==4 break + if {$i==4} break if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -386,7 +386,7 @@ proc formatMail {} { continue } } - if $inheaders { + if {$inheaders} { set limit 55 } else { set limit 55 @@ -430,12 +430,12 @@ proc formatMail {} { continue } } - set climit [expr $limit-1] + set climit [expr {$limit-1}] set cutoff 50 set continuation 0 while {[string length $line] > $limit} { - for {set c [expr $limit-1]} {$c >= $cutoff} {incr c -1} { + for {set c [expr {$limit-1}]} {$c >= $cutoff} {incr c -1} { set char [string index $line $c] if {$char == " " || $char == "\t"} { break @@ -446,7 +446,7 @@ proc formatMail {} { } if {$c < $cutoff} { if {! $inheaders} { - set c [expr $limit-1] + set c [expr {$limit-1}] } else { set c [string length $line] } @@ -585,7 +585,7 @@ Tcl/Tk Shop. Check it out! test for-4.1 {break must reset the interp result} { catch { set z GLOBTESTDIR/dir2/file2.c - if [string match GLOBTESTDIR/dir2/* $z] { + if {[string match GLOBTESTDIR/dir2/* $z]} { break } } j @@ -696,8 +696,8 @@ test for-6.9 {Tcl_ForObjCmd: error executing command body} -body { test for-6.10 {Tcl_ForObjCmd: simple command body} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 break + $z {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} break set a [concat $a $i] } set a @@ -705,7 +705,7 @@ test for-6.10 {Tcl_ForObjCmd: simple command body} { test for-6.11 {Tcl_ForObjCmd: command body in quotes} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr $i+1]} "append a x" + $z {set i 1} {$i<6} {set i [expr {$i+1}]} "append a x" set a } {xxxxx} test for-6.12 {Tcl_ForObjCmd: computed command body} { @@ -717,7 +717,7 @@ test for-6.12 {Tcl_ForObjCmd: computed command body} { set bb {break} set x2 {; append a x2} set a {} - $z {set i 1} {$i<6} {set i [expr $i+1]} $x1$bb$x2 + $z {set i 1} {$i<6} {set i [expr {$i+1}]} $x1$bb$x2 set a } {x1} test for-6.13 {Tcl_ForObjCmd: error in "next" command} -body { @@ -733,9 +733,9 @@ test for-6.13 {Tcl_ForObjCmd: error in "next" command} -body { test for-6.14 {Tcl_ForObjCmd: long command body} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr $i+1]} { - if $i==4 break - if $i>5 continue + $z {set i 1} {$i<6} {set i [expr {$i+1}]} { + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg diff --git a/tests/history.test b/tests/history.test index 76ce54e..b6a2755 100644 --- a/tests/history.test +++ b/tests/history.test @@ -40,7 +40,7 @@ test history-1.1 {event option} history {history event -1} \ {set b [format {A test %s} string]} test history-1.2 {event option} history {history event $num} \ {set a 12345} -test history-1.3 {event option} history {history event [expr $num+2]} \ +test history-1.3 {event option} history {history event [expr {$num+2}]} \ {Another test} test history-1.4 {event option} history {history event set} \ {set b [format {A test %s} string]} @@ -149,11 +149,11 @@ test history-5.1 {info option} history {history info} [format {%6d set a {b %6d set b 1234 %6d set c {a b - c}} $num [expr $num+1] [expr $num+2]] + c}} $num [expr {$num+1}] [expr {$num+2}]] test history-5.2 {info option} history {history i 2} [format {%6d set b 1234 %6d set c {a b - c}} [expr $num+1] [expr $num+2]] + c}} [expr {$num+1}] [expr {$num+2}]] test history-5.3 {info option} history {catch {history i 2 3}} 1 test history-5.4 {info option} history { catch {history i 2 3} msg @@ -164,7 +164,7 @@ test history-5.5 {info option} history {history} [format {%6d set a {b %6d set b 1234 %6d set c {a b - c}} $num [expr $num+1] [expr $num+2]] + c}} $num [expr {$num+1}] [expr {$num+2}]] # "history keep" @@ -174,7 +174,9 @@ if {[testConstraint history]} { history add "foo3" history keep 2 } -test history-6.1 {keep option} history {history event [expr [history n]-1]} foo3 +test history-6.1 {keep option} history { + history event [expr {[history n]-1}] +} foo3 test history-6.2 {keep option} history {history event -1} foo2 test history-6.3 {keep option} history {catch {history event -3}} 1 test history-6.4 {keep option} history { @@ -216,7 +218,7 @@ if {[testConstraint history]} { history add "Testing2" } test history-7.1 {nextid option} history {history event} "Testing" -test history-7.2 {nextid option} history {history next} [expr $num+2] +test history-7.2 {nextid option} history {history next} [expr {$num+2}] test history-7.3 {nextid option} history {catch {history nextid garbage}} 1 test history-7.4 {nextid option} history { catch {history nextid garbage} msg @@ -262,7 +264,7 @@ test history-10.1 {references kept by history} -constraints history -setup { } -body { histtest eval { # A fresh object, refcount 1 from the variable we write it to - set obj [expr rand()] + set obj [expr {rand()}] set baseline [refcount $obj] lappend result [refcount $obj] history add [list list $obj] @@ -288,7 +290,7 @@ test history-10.2 {references kept by history} -constraints history -setup { } -body { histtest eval { # A fresh object, refcount 1 from the variable we write it to - set obj [expr rand()] + set obj [expr {rand()}] set baseline [refcount $obj] lappend result [refcount $obj] history add [list list $obj] diff --git a/tests/http.test b/tests/http.test index 97e6cfa..d1b2d22 100644 --- a/tests/http.test +++ b/tests/http.test @@ -128,7 +128,7 @@ test http-3.2 {http::geturl} -returnCodes error -body { http::geturl http:junk } -result {Unsupported URL: http:junk} set url //${::HOST}:$port -set badurl //${::HOST}:[expr $port+1] +set badurl //${::HOST}:[expr {$port+1}] test http-3.3 {http::geturl} -body { set token [http::geturl $url] http::data $token diff --git a/tests/httpold.test b/tests/httpold.test index dec4697..1b07c90 100644 --- a/tests/httpold.test +++ b/tests/httpold.test @@ -49,7 +49,7 @@ catch {unset data} source [file join [file dirname [info script]] httpd] set port 8010 -if [catch {httpd_init $port} listen] { +if {[catch {httpd_init $port} listen]} { puts "Cannot start http server, http test skipped" unset port ::tcltest::cleanupTests diff --git a/tests/if.test b/tests/if.test index f5acf60..e589351 100644 --- a/tests/if.test +++ b/tests/if.test @@ -142,7 +142,7 @@ test if-1.16 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -165,7 +165,7 @@ test if-1.16 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -239,7 +239,7 @@ test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -262,7 +262,7 @@ test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -287,7 +287,7 @@ test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 5 @@ -310,7 +310,7 @@ test if-2.5 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 6 @@ -389,7 +389,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -412,7 +412,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -437,7 +437,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 5 @@ -460,7 +460,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 6 @@ -485,7 +485,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 8 @@ -508,7 +508,7 @@ test if-3.6 {TclCompileIfCmd: test jumpFalse instruction replacement after long set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 9 @@ -713,7 +713,7 @@ test if-5.16 {if cmd with computed command names: test jumpFalse instruction rep set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -736,7 +736,7 @@ test if-5.16 {if cmd with computed command names: test jumpFalse instruction rep set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -816,7 +816,7 @@ test if-6.5 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -839,7 +839,7 @@ test if-6.5 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -864,7 +864,7 @@ test if-6.5 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 5 @@ -887,7 +887,7 @@ test if-6.5 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 6 @@ -975,7 +975,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 2 @@ -998,7 +998,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 3 @@ -1023,7 +1023,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 5 @@ -1046,7 +1046,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 6 @@ -1071,7 +1071,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 8 @@ -1094,7 +1094,7 @@ test if-7.6 {if cmd with computed command names: test jumpFalse instruction repl set i $i set i [lindex $s $i] } - set i [expr $i-1] + incr i -1 } } set a 9 diff --git a/tests/info.test b/tests/info.test index 3f42d93..fb9e0de 100644 --- a/tests/info.test +++ b/tests/info.test @@ -325,7 +325,7 @@ test info-9.2 {info level option} { } {1 {t1 146 testString}} test info-9.3 {info level option} { proc t1 {a b} { - t2 [expr $a*2] $b + t2 [expr {$a*2}] $b } proc t2 {x y} { list [info level] [info level 1] [info level 2] [info level -1] \ @@ -2099,7 +2099,7 @@ proc foo::bar {} { foreach {*}{ x y {set res [info frame 0]} - } + } return $res } test info-33.13 {{*}, literal, simple, bytecompiled} -body { @@ -2114,7 +2114,7 @@ proc foo::bar {} { if {*}{ {[return [info frame 0]]} {} - } + } } test info-33.14 {{*}, literal, simple, bytecompiled} -body { reduce [foo::bar] @@ -2128,7 +2128,7 @@ proc foo::bar {} { if 0 {*}{ {} else {return [info frame 0]} - } + } } test info-33.15 {{*}, literal, simple, bytecompiled} -body { reduce [foo::bar] @@ -2229,7 +2229,7 @@ namespace eval foo {} proc foo::bar {} { try {*}{ {set res [info frame 0]} - } + } return $res } test info-33.23 {{*}, literal, simple, bytecompiled} -body { diff --git a/tests/interp.test b/tests/interp.test index 8a4d064..d742484 100644 --- a/tests/interp.test +++ b/tests/interp.test @@ -105,7 +105,7 @@ test interp-2.11 {anonymous interps vs existing procs} { proc interp$thenum {} {} set x [interp create] regexp "interp(\[0-9]+)" $x dummy anothernum - expr $anothernum > $thenum + expr {$anothernum > $thenum} } 1 test interp-2.12 {anonymous interps vs existing procs} { set x [interp create -safe] @@ -114,7 +114,7 @@ test interp-2.12 {anonymous interps vs existing procs} { proc interp$thenum {} {} set x [interp create -safe] regexp "interp(\[0-9]+)" $x dummy anothernum - expr $anothernum - $thenum + expr {$anothernum - $thenum} } 1 test interp-2.13 {correct default when no $path arg is given} -body { interp create -- @@ -224,22 +224,22 @@ interp create a # Part 5: Testing eval in interpreter object command and with interp command test interp-6.1 {testing eval} { - a eval expr 3 + 5 + a eval expr {{3 + 5}} } 8 test interp-6.2 {testing eval} -returnCodes error -body { a eval foo } -result {invalid command name "foo"} test interp-6.3 {testing eval} { - a eval {proc foo {} {expr 3 + 5}} + a eval {proc foo {} {expr {3 + 5}}} a eval foo } 8 -catch {a eval {proc foo {} {expr 3 + 5}}} +catch {a eval {proc foo {} {expr {3 + 5}}}} test interp-6.4 {testing eval} { interp eval a foo } 8 test interp-6.5 {testing eval} { interp create {a x2} - interp eval {a x2} {proc frob {} {expr 4 * 9}} + interp eval {a x2} {proc frob {} {expr {4 * 9}}} interp eval {a x2} frob } 36 catch {interp create {a x2}} @@ -746,7 +746,7 @@ test interp-16.5 {testing deletion order, bgerror} { xxx eval {proc bgerror {args} {exit}} xxx alias exit kill xxx proc kill {i} {interp delete $i} - xxx eval after 100 expr a + b + xxx eval after 100 expr {a + b} after 200 update interp exists xxx @@ -966,7 +966,7 @@ test interp-19.9 {alias deletion, renaming} { interp create a interp alias a foo a bar interp eval a rename foo blotz - interp eval a {proc foo {} {expr 34 * 34}} + interp eval a {proc foo {} {expr {34 * 34}}} interp alias a foo {} set l [interp eval a foo] interp delete a @@ -3171,7 +3171,7 @@ test interp-34.3.1 {basic test of limits - pure inside-command loop} -body { } } # We use a time limit here; command limits don't trap this case - $i limit time -seconds [expr {[clock seconds]+2}] + $i limit time -seconds [expr {[clock seconds] + 2}] $i eval foobar } -returnCodes error -result {time limit exceeded} -cleanup { interp delete $i @@ -3193,8 +3193,8 @@ test interp-34.4 {limits with callbacks: extending limits} -setup { } -body { interp alias $i foo {} cb1 set curlim [$i eval info cmdcount] - $i limit command -command "cb2 [expr $curlim+100]" \ - -value [expr {$curlim+10}] + $i limit command -command "cb2 [expr {$curlim + 100}]" \ + -value [expr {$curlim + 10}] $i eval {for {set i 0} {$i<10} {incr i} {foo}} list $a $b $c } -result {6 4 b} -cleanup { @@ -3222,7 +3222,7 @@ test interp-34.5 {limits with callbacks: removing limits} -setup { } -body { interp alias $i foo {} cb1 set curlim [$i eval info cmdcount] - $i limit command -command "cb2 {}" -value [expr {$curlim+10}] + $i limit command -command "cb2 {}" -value [expr {$curlim + 10}] $i eval {for {set i 0} {$i<10} {incr i} {foo}} list $a $b $c } -result {6 4 b} -cleanup { @@ -3247,7 +3247,7 @@ test interp-34.6 {limits with callbacks: removing limits and handlers} -setup { } -body { interp alias $i foo {} cb1 set curlim [$i eval info cmdcount] - $i limit command -command cb2 -value [expr {$curlim+10}] + $i limit command -command cb2 -value [expr {$curlim + 10}] $i eval {for {set i 0} {$i<10} {incr i} {foo}} list $a $b $c } -result {6 4 b} -cleanup { @@ -3266,7 +3266,7 @@ test interp-34.7 {limits with callbacks: deleting the handler interp} -setup { proc cb2 {args} { global c i curlim set c b - $i limit command -value [expr {$curlim+1000}] + $i limit command -value [expr {$curlim + 1000}] trapToParent } } @@ -3289,7 +3289,7 @@ test interp-34.7 {limits with callbacks: deleting the handler interp} -setup { set c a interp alias $i foo {} cb1 set curlim [$i eval info cmdcount] - $i limit command -command cb2 -value [expr {$curlim+10}] + $i limit command -command cb2 -value [expr {$curlim + 10}] } $i eval { $i eval { @@ -3304,7 +3304,7 @@ test interp-34.7 {limits with callbacks: deleting the handler interp} -setup { # Bug 1085023 test interp-34.8 {time limits trigger in vwaits} -body { set i [interp create] - interp limit $i time -seconds [expr {[clock seconds]+1}] -granularity 1 + interp limit $i time -seconds [expr {[clock seconds] + 1}] -granularity 1 $i eval { set x {} vwait x @@ -3352,8 +3352,8 @@ test interp-34.11 {time limit extension in callbacks} -setup { } -body { set i [interp create] set t0 [clock seconds] - $i limit time -seconds [expr {$t0+1}] -granularity 1 \ - -command "cb1 $i [expr {$t0+2}]" + $i limit time -seconds [expr {$t0 + 1}] -granularity 1 \ + -command "cb1 $i [expr {$t0 + 2}]" set ::result {} lappend ::result [catch { $i eval { @@ -3380,8 +3380,8 @@ test interp-34.12 {time limit extension in callbacks} -setup { } -body { set i [interp create] set t0 [clock seconds] - set ::times "[expr {$t0+2}] [expr {$t0+100}]" - $i limit time -seconds [expr {$t0+1}] -granularity 1 -command "cb1 $i" + set ::times "[expr {$t0 + 2}] [expr {$t0 + 100}]" + $i limit time -seconds [expr {$t0 + 1}] -granularity 1 -command "cb1 $i" set ::result {} lappend ::result [catch { $i eval { @@ -3615,8 +3615,8 @@ test interp-37.1 {safe interps and min() and max(): Bug 2895741} -setup { set result {} } -body { interp create {a b} -safe - lappend result [interp eval a {expr min(5,2,3)*max(7,13,11)}] - lappend result [interp eval {a b} {expr min(5,2,3)*max(7,13,11)}] + lappend result [interp eval a {expr {min(5,2,3)*max(7,13,11)}}] + lappend result [interp eval {a b} {expr {min(5,2,3)*max(7,13,11)}}] } -cleanup { unset -nocomplain result interp delete a diff --git a/tests/io.test b/tests/io.test index 5f668e6..baf9b1c 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7514,7 +7514,7 @@ test io-53.5 {CopyData: error during fcopy} {socket fcopy} { close $listen ;# This means the socket open never really succeeds fcopy $in $out -command [namespace code FcopyTestDone] variable fcopyTestDone - if ![info exists fcopyTestDone] { + if {![info exists fcopyTestDone]} { vwait [namespace which -variable fcopyTestDone] ;# The error occurs here in the b.g. } close $in @@ -7533,7 +7533,7 @@ test io-53.6 {CopyData: error during fcopy} {stdio fcopy} { set out [open $path(test1) w] fcopy $in $out -command [namespace code FcopyTestDone] variable fcopyTestDone - if ![info exists fcopyTestDone] { + if {![info exists fcopyTestDone]} { vwait [namespace which -variable fcopyTestDone] } catch {close $in} @@ -7580,7 +7580,7 @@ test io-53.7 {CopyData: Flooding fcopy from pipe} {stdio fcopy} { set out [open $path(test1) w] doFcopy $in $out variable fcopyTestDone - if ![info exists fcopyTestDone] { + if {![info exists fcopyTestDone]} { vwait [namespace which -variable fcopyTestDone] } catch {close $in} diff --git a/tests/list.test b/tests/list.test index edb572c..8e85ed8 100644 --- a/tests/list.test +++ b/tests/list.test @@ -98,26 +98,26 @@ concat {} proc slowsort list { set result {} - set last [expr [llength $list] - 1] + set last [expr {[llength $list] - 1}] while {$last > 0} { - set minIndex [expr [llength $list] - 1] + set minIndex [expr {[llength $list] - 1}] set min [lindex $list $last] - set i [expr $minIndex-1] + set i [expr {$minIndex - 1}] while {$i >= 0} { if {[string compare [lindex $list $i] $min] < 0} { set minIndex $i set min [lindex $list $i] } - set i [expr $i-1] + set i [expr {$i - 1}] } set result [concat $result [list $min]] if {$minIndex == 0} { set list [lrange $list 1 end] } else { - set list [concat [lrange $list 0 [expr $minIndex-1]] \ - [lrange $list [expr $minIndex+1] end]] + set list [concat [lrange $list 0 [expr {$minIndex - 1}]] \ + [lrange $list [expr {$minIndex + 1}] end]] } - set last [expr $last-1] + set last [expr {$last - 1}] } return [concat $result $list] } diff --git a/tests/load.test b/tests/load.test index 9fdf1cf..c79ddf4 100644 --- a/tests/load.test +++ b/tests/load.test @@ -45,30 +45,30 @@ testConstraint teststaticpkg [llength [info commands teststaticpkg]] testConstraint testsimplefilesystem \ [llength [info commands testsimplefilesystem]] -test load-1.1 {basic errors} {} { - list [catch {load} msg] $msg -} "1 {wrong \# args: should be \"load ?-global? ?-lazy? ?--? fileName ?packageName? ?interp?\"}" -test load-1.2 {basic errors} {} { - list [catch {load a b c d} msg] $msg -} "1 {wrong \# args: should be \"load ?-global? ?-lazy? ?--? fileName ?packageName? ?interp?\"}" -test load-1.3 {basic errors} {} { - list [catch {load a b foobar} msg] $msg -} {1 {could not find interpreter "foobar"}} -test load-1.4 {basic errors} {} { - list [catch {load -global {}} msg] $msg -} {1 {must specify either file name or package name}} -test load-1.5 {basic errors} {} { - list [catch {load -lazy {} {}} msg] $msg -} {1 {must specify either file name or package name}} -test load-1.6 {basic errors} {} { - list [catch {load {} Unknown} msg] $msg -} {1 {package "Unknown" isn't loaded statically}} -test load-1.7 {basic errors} {} { - list [catch {load -abc foo} msg] $msg -} "1 {bad option \"-abc\": must be -global, -lazy, or --}" -test load-1.8 {basic errors} {} { - list [catch {load -global} msg] $msg -} "1 {couldn't figure out package name for -global}" +test load-1.1 {basic errors} -returnCodes error -body { + load +} -result {wrong # args: should be "load ?-global? ?-lazy? ?--? fileName ?packageName? ?interp?"} +test load-1.2 {basic errors} -returnCodes error -body { + load a b c d +} -result {wrong # args: should be "load ?-global? ?-lazy? ?--? fileName ?packageName? ?interp?"} +test load-1.3 {basic errors} -returnCodes error -body { + load a b foobar +} -result {could not find interpreter "foobar"} +test load-1.4 {basic errors} -returnCodes error -body { + load -global {} +} -result {must specify either file name or package name} +test load-1.5 {basic errors} -returnCodes error -body { + load -lazy {} {} +} -result {must specify either file name or package name} +test load-1.6 {basic errors} -returnCodes error -body { + load {} Unknown +} -result {package "Unknown" isn't loaded statically} +test load-1.7 {basic errors} -returnCodes error -body { + load -abc foo +} -result {bad option "-abc": must be -global, -lazy, or --} +test load-1.8 {basic errors} -returnCodes error -body { + load -global +} -result {couldn't figure out package name for -global} test load-2.1 {basic loading, with guess for package name} \ [list $dll $loaded] { @@ -130,16 +130,16 @@ test load-4.2 {reloading package into same interpreter} -setup { load [file join $testDir pkga$ext] pkgb } -result "file \"[file join $testDir pkga$ext]\" is already loaded for package \"Pkga\"" -test load-5.1 {file name not specified and no static package: pick default} \ - [list $dll $loaded] { +test load-5.1 {file name not specified and no static package: pick default} -setup { catch {interp delete x} interp create x +} -constraints [list $dll $loaded] -body { load -global [file join $testDir pkga$ext] pkga load {} pkga x - set result [info loaded x] + info loaded x +} -cleanup { interp delete x - set result -} [list [list [file join $testDir pkga$ext] Pkga]] +} -result [list [list [file join $testDir pkga$ext] Pkga]] # On some platforms, like SunOS 4.1.3, these tests can't be run because # they cause the process to exit. @@ -185,16 +185,16 @@ test load-7.4 {Tcl_StaticPackage procedure, redundant calls} -setup { info loaded } -result [list {{} Double} {{} More} {{} Another} {{} Test} {*}$currentRealPackages {*}$alreadyTotalLoaded] -testConstraint teststaticpkg_8.x \ - [if {[testConstraint teststaticpkg]} { +testConstraint teststaticpkg_8.x 0 +if {[testConstraint teststaticpkg]} { + catch { teststaticpkg Test 1 1 teststaticpkg Another 0 1 teststaticpkg More 0 1 teststaticpkg Double 0 1 - expr 1 - } else { - expr 0 - }] + testConstraint teststaticpkg_8.x 1 + } +} test load-8.1 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loaded] { lsort -index 1 [info loaded] @@ -214,30 +214,32 @@ test load-8.4 {TclGetLoadedPackages procedure} [list teststaticpkg_8.x $dll $loa } [list [lsort -index 1 [concat [list [list [file join $testDir pkgb$ext] Pkgb] {{} Double} {{} More} {{} Another} {{} Test} [list [file join $testDir pkga$ext] Pkga]] $alreadyLoaded]] {pkgb_demo pkgb_sub pkgb_unsafe}] interp delete child -test load-9.1 {Tcl_StaticPackage, load already-loaded package into another interp} \ - -constraints {teststaticpkg} \ - -setup { - interp create child1 - interp create child2 - load {} Tcltest child1 - load {} Tcltest child2 - } \ - -body { - child1 eval { teststaticpkg Loadninepointone 0 1 } - child2 eval { teststaticpkg Loadninepointone 0 1 } - list \ - [child1 eval { info loaded {} }] \ - [child2 eval { info loaded {} }] - } \ - -match glob -result {{{{} Loadninepointone} {* Tcltest}} {{{} Loadninepointone} {* Tcltest}}} \ - -cleanup { interp delete child1 ; interp delete child2 } - -test load-10.1 {load from vfs} \ - -constraints [list $dll $loaded testsimplefilesystem] \ - -setup {set dir [pwd]; cd $testDir; testsimplefilesystem 1} \ - -body {list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg} \ - -result {0 {}} \ - -cleanup {testsimplefilesystem 0; cd $dir; unset dir} +test load-9.1 {Tcl_StaticPackage, load already-loaded package into another interp} -setup { + interp create child1 + interp create child2 + load {} Tcltest child1 + load {} Tcltest child2 +} -constraints {teststaticpkg} -body { + child1 eval { teststaticpkg Loadninepointone 0 1 } + child2 eval { teststaticpkg Loadninepointone 0 1 } + list [child1 eval { info loaded {} }] \ + [child2 eval { info loaded {} }] +} -match glob -cleanup { + interp delete child1 + interp delete child2 +} -result {{{{} Loadninepointone} {* Tcltest}} {{{} Loadninepointone} {* Tcltest}}} + +test load-10.1 {load from vfs} -setup { + set dir [pwd] + cd $testDir + testsimplefilesystem 1 +} -constraints [list $dll $loaded testsimplefilesystem] -body { + list [catch {load simplefs:/pkgd$ext pkgd} msg] $msg +} -result {0 {}} -cleanup { + testsimplefilesystem 0 + cd $dir + unset dir +} test load-11.1 {Load TclOO extension using Stubs (Bug [f51efe99a7])} \ [list $dll $loaded] { diff --git a/tests/lsearch.test b/tests/lsearch.test index aa43862..27ae4aa 100644 --- a/tests/lsearch.test +++ b/tests/lsearch.test @@ -384,7 +384,7 @@ test lsearch-14.8 {combinations: -start, -inline and -not} { } {c4} test lsearch-15.1 {make sure no shimmering occurs} { - set x [expr int(sin(0))] + set x [expr {int(sin(0))}] lsearch -start $x $x $x } 0 diff --git a/tests/lsetComp.test b/tests/lsetComp.test index d8ad246..d50e0b2 100644 --- a/tests/lsetComp.test +++ b/tests/lsetComp.test @@ -22,7 +22,7 @@ if {"::tcltest" ni [namespace children]} { proc evalInProc { script } { proc testProc {} $script set status [catch { - testProc + testProc } result] rename testProc {} return [list $status $result] @@ -60,69 +60,69 @@ test lsetComp-2.3 {lset, compiled, list of args, scalar, one-byte offset} { test lsetComp-2.4 {lset, compiled, list of args, scalar, four-byte offset} { evalInProc { - set x0 0; set x1 0; set x2 0; set x3 0; - set x4 0; set x5 0; set x6 0; set x7 0; - set x8 0; set x9 0; set x10 0; set x11 0; - set x12 0; set x13 0; set x14 0; set x15 0; - set x16 0; set x17 0; set x18 0; set x19 0; - set x20 0; set x21 0; set x22 0; set x23 0; - set x24 0; set x25 0; set x26 0; set x27 0; - set x28 0; set x29 0; set x30 0; set x31 0; - set x32 0; set x33 0; set x34 0; set x35 0; - set x36 0; set x37 0; set x38 0; set x39 0; - set x40 0; set x41 0; set x42 0; set x43 0; - set x44 0; set x45 0; set x46 0; set x47 0; - set x48 0; set x49 0; set x50 0; set x51 0; - set x52 0; set x53 0; set x54 0; set x55 0; - set x56 0; set x57 0; set x58 0; set x59 0; - set x60 0; set x61 0; set x62 0; set x63 0; - set x64 0; set x65 0; set x66 0; set x67 0; - set x68 0; set x69 0; set x70 0; set x71 0; - set x72 0; set x73 0; set x74 0; set x75 0; - set x76 0; set x77 0; set x78 0; set x79 0; - set x80 0; set x81 0; set x82 0; set x83 0; - set x84 0; set x85 0; set x86 0; set x87 0; - set x88 0; set x89 0; set x90 0; set x91 0; - set x92 0; set x93 0; set x94 0; set x95 0; - set x96 0; set x97 0; set x98 0; set x99 0; - set x100 0; set x101 0; set x102 0; set x103 0; - set x104 0; set x105 0; set x106 0; set x107 0; - set x108 0; set x109 0; set x110 0; set x111 0; - set x112 0; set x113 0; set x114 0; set x115 0; - set x116 0; set x117 0; set x118 0; set x119 0; - set x120 0; set x121 0; set x122 0; set x123 0; - set x124 0; set x125 0; set x126 0; set x127 0; - set x128 0; set x129 0; set x130 0; set x131 0; - set x132 0; set x133 0; set x134 0; set x135 0; - set x136 0; set x137 0; set x138 0; set x139 0; - set x140 0; set x141 0; set x142 0; set x143 0; - set x144 0; set x145 0; set x146 0; set x147 0; - set x148 0; set x149 0; set x150 0; set x151 0; - set x152 0; set x153 0; set x154 0; set x155 0; - set x156 0; set x157 0; set x158 0; set x159 0; - set x160 0; set x161 0; set x162 0; set x163 0; - set x164 0; set x165 0; set x166 0; set x167 0; - set x168 0; set x169 0; set x170 0; set x171 0; - set x172 0; set x173 0; set x174 0; set x175 0; - set x176 0; set x177 0; set x178 0; set x179 0; - set x180 0; set x181 0; set x182 0; set x183 0; - set x184 0; set x185 0; set x186 0; set x187 0; - set x188 0; set x189 0; set x190 0; set x191 0; - set x192 0; set x193 0; set x194 0; set x195 0; - set x196 0; set x197 0; set x198 0; set x199 0; - set x200 0; set x201 0; set x202 0; set x203 0; - set x204 0; set x205 0; set x206 0; set x207 0; - set x208 0; set x209 0; set x210 0; set x211 0; - set x212 0; set x213 0; set x214 0; set x215 0; - set x216 0; set x217 0; set x218 0; set x219 0; - set x220 0; set x221 0; set x222 0; set x223 0; - set x224 0; set x225 0; set x226 0; set x227 0; - set x228 0; set x229 0; set x230 0; set x231 0; - set x232 0; set x233 0; set x234 0; set x235 0; - set x236 0; set x237 0; set x238 0; set x239 0; - set x240 0; set x241 0; set x242 0; set x243 0; - set x244 0; set x245 0; set x246 0; set x247 0; - set x248 0; set x249 0; set x250 0; set x251 0; + set x0 0; set x1 0; set x2 0; set x3 0; + set x4 0; set x5 0; set x6 0; set x7 0; + set x8 0; set x9 0; set x10 0; set x11 0; + set x12 0; set x13 0; set x14 0; set x15 0; + set x16 0; set x17 0; set x18 0; set x19 0; + set x20 0; set x21 0; set x22 0; set x23 0; + set x24 0; set x25 0; set x26 0; set x27 0; + set x28 0; set x29 0; set x30 0; set x31 0; + set x32 0; set x33 0; set x34 0; set x35 0; + set x36 0; set x37 0; set x38 0; set x39 0; + set x40 0; set x41 0; set x42 0; set x43 0; + set x44 0; set x45 0; set x46 0; set x47 0; + set x48 0; set x49 0; set x50 0; set x51 0; + set x52 0; set x53 0; set x54 0; set x55 0; + set x56 0; set x57 0; set x58 0; set x59 0; + set x60 0; set x61 0; set x62 0; set x63 0; + set x64 0; set x65 0; set x66 0; set x67 0; + set x68 0; set x69 0; set x70 0; set x71 0; + set x72 0; set x73 0; set x74 0; set x75 0; + set x76 0; set x77 0; set x78 0; set x79 0; + set x80 0; set x81 0; set x82 0; set x83 0; + set x84 0; set x85 0; set x86 0; set x87 0; + set x88 0; set x89 0; set x90 0; set x91 0; + set x92 0; set x93 0; set x94 0; set x95 0; + set x96 0; set x97 0; set x98 0; set x99 0; + set x100 0; set x101 0; set x102 0; set x103 0; + set x104 0; set x105 0; set x106 0; set x107 0; + set x108 0; set x109 0; set x110 0; set x111 0; + set x112 0; set x113 0; set x114 0; set x115 0; + set x116 0; set x117 0; set x118 0; set x119 0; + set x120 0; set x121 0; set x122 0; set x123 0; + set x124 0; set x125 0; set x126 0; set x127 0; + set x128 0; set x129 0; set x130 0; set x131 0; + set x132 0; set x133 0; set x134 0; set x135 0; + set x136 0; set x137 0; set x138 0; set x139 0; + set x140 0; set x141 0; set x142 0; set x143 0; + set x144 0; set x145 0; set x146 0; set x147 0; + set x148 0; set x149 0; set x150 0; set x151 0; + set x152 0; set x153 0; set x154 0; set x155 0; + set x156 0; set x157 0; set x158 0; set x159 0; + set x160 0; set x161 0; set x162 0; set x163 0; + set x164 0; set x165 0; set x166 0; set x167 0; + set x168 0; set x169 0; set x170 0; set x171 0; + set x172 0; set x173 0; set x174 0; set x175 0; + set x176 0; set x177 0; set x178 0; set x179 0; + set x180 0; set x181 0; set x182 0; set x183 0; + set x184 0; set x185 0; set x186 0; set x187 0; + set x188 0; set x189 0; set x190 0; set x191 0; + set x192 0; set x193 0; set x194 0; set x195 0; + set x196 0; set x197 0; set x198 0; set x199 0; + set x200 0; set x201 0; set x202 0; set x203 0; + set x204 0; set x205 0; set x206 0; set x207 0; + set x208 0; set x209 0; set x210 0; set x211 0; + set x212 0; set x213 0; set x214 0; set x215 0; + set x216 0; set x217 0; set x218 0; set x219 0; + set x220 0; set x221 0; set x222 0; set x223 0; + set x224 0; set x225 0; set x226 0; set x227 0; + set x228 0; set x229 0; set x230 0; set x231 0; + set x232 0; set x233 0; set x234 0; set x235 0; + set x236 0; set x237 0; set x238 0; set x239 0; + set x240 0; set x241 0; set x242 0; set x243 0; + set x244 0; set x245 0; set x246 0; set x247 0; + set x248 0; set x249 0; set x250 0; set x251 0; set x252 0; set x253 0; set x254 0; set x255 0; set x {{1 2} {3 4}} lset x {1 1} 5 @@ -145,69 +145,69 @@ test lsetComp-2.6 {lset, compiled, list of args, array, one-byte offset} { test lsetComp-2.7 {lset, compiled, list of args, array, four-byte offset} { evalInProc { - set x0 0; set x1 0; set x2 0; set x3 0; - set x4 0; set x5 0; set x6 0; set x7 0; - set x8 0; set x9 0; set x10 0; set x11 0; - set x12 0; set x13 0; set x14 0; set x15 0; - set x16 0; set x17 0; set x18 0; set x19 0; - set x20 0; set x21 0; set x22 0; set x23 0; - set x24 0; set x25 0; set x26 0; set x27 0; - set x28 0; set x29 0; set x30 0; set x31 0; - set x32 0; set x33 0; set x34 0; set x35 0; - set x36 0; set x37 0; set x38 0; set x39 0; - set x40 0; set x41 0; set x42 0; set x43 0; - set x44 0; set x45 0; set x46 0; set x47 0; - set x48 0; set x49 0; set x50 0; set x51 0; - set x52 0; set x53 0; set x54 0; set x55 0; - set x56 0; set x57 0; set x58 0; set x59 0; - set x60 0; set x61 0; set x62 0; set x63 0; - set x64 0; set x65 0; set x66 0; set x67 0; - set x68 0; set x69 0; set x70 0; set x71 0; - set x72 0; set x73 0; set x74 0; set x75 0; - set x76 0; set x77 0; set x78 0; set x79 0; - set x80 0; set x81 0; set x82 0; set x83 0; - set x84 0; set x85 0; set x86 0; set x87 0; - set x88 0; set x89 0; set x90 0; set x91 0; - set x92 0; set x93 0; set x94 0; set x95 0; - set x96 0; set x97 0; set x98 0; set x99 0; - set x100 0; set x101 0; set x102 0; set x103 0; - set x104 0; set x105 0; set x106 0; set x107 0; - set x108 0; set x109 0; set x110 0; set x111 0; - set x112 0; set x113 0; set x114 0; set x115 0; - set x116 0; set x117 0; set x118 0; set x119 0; - set x120 0; set x121 0; set x122 0; set x123 0; - set x124 0; set x125 0; set x126 0; set x127 0; - set x128 0; set x129 0; set x130 0; set x131 0; - set x132 0; set x133 0; set x134 0; set x135 0; - set x136 0; set x137 0; set x138 0; set x139 0; - set x140 0; set x141 0; set x142 0; set x143 0; - set x144 0; set x145 0; set x146 0; set x147 0; - set x148 0; set x149 0; set x150 0; set x151 0; - set x152 0; set x153 0; set x154 0; set x155 0; - set x156 0; set x157 0; set x158 0; set x159 0; - set x160 0; set x161 0; set x162 0; set x163 0; - set x164 0; set x165 0; set x166 0; set x167 0; - set x168 0; set x169 0; set x170 0; set x171 0; - set x172 0; set x173 0; set x174 0; set x175 0; - set x176 0; set x177 0; set x178 0; set x179 0; - set x180 0; set x181 0; set x182 0; set x183 0; - set x184 0; set x185 0; set x186 0; set x187 0; - set x188 0; set x189 0; set x190 0; set x191 0; - set x192 0; set x193 0; set x194 0; set x195 0; - set x196 0; set x197 0; set x198 0; set x199 0; - set x200 0; set x201 0; set x202 0; set x203 0; - set x204 0; set x205 0; set x206 0; set x207 0; - set x208 0; set x209 0; set x210 0; set x211 0; - set x212 0; set x213 0; set x214 0; set x215 0; - set x216 0; set x217 0; set x218 0; set x219 0; - set x220 0; set x221 0; set x222 0; set x223 0; - set x224 0; set x225 0; set x226 0; set x227 0; - set x228 0; set x229 0; set x230 0; set x231 0; - set x232 0; set x233 0; set x234 0; set x235 0; - set x236 0; set x237 0; set x238 0; set x239 0; - set x240 0; set x241 0; set x242 0; set x243 0; - set x244 0; set x245 0; set x246 0; set x247 0; - set x248 0; set x249 0; set x250 0; set x251 0; + set x0 0; set x1 0; set x2 0; set x3 0; + set x4 0; set x5 0; set x6 0; set x7 0; + set x8 0; set x9 0; set x10 0; set x11 0; + set x12 0; set x13 0; set x14 0; set x15 0; + set x16 0; set x17 0; set x18 0; set x19 0; + set x20 0; set x21 0; set x22 0; set x23 0; + set x24 0; set x25 0; set x26 0; set x27 0; + set x28 0; set x29 0; set x30 0; set x31 0; + set x32 0; set x33 0; set x34 0; set x35 0; + set x36 0; set x37 0; set x38 0; set x39 0; + set x40 0; set x41 0; set x42 0; set x43 0; + set x44 0; set x45 0; set x46 0; set x47 0; + set x48 0; set x49 0; set x50 0; set x51 0; + set x52 0; set x53 0; set x54 0; set x55 0; + set x56 0; set x57 0; set x58 0; set x59 0; + set x60 0; set x61 0; set x62 0; set x63 0; + set x64 0; set x65 0; set x66 0; set x67 0; + set x68 0; set x69 0; set x70 0; set x71 0; + set x72 0; set x73 0; set x74 0; set x75 0; + set x76 0; set x77 0; set x78 0; set x79 0; + set x80 0; set x81 0; set x82 0; set x83 0; + set x84 0; set x85 0; set x86 0; set x87 0; + set x88 0; set x89 0; set x90 0; set x91 0; + set x92 0; set x93 0; set x94 0; set x95 0; + set x96 0; set x97 0; set x98 0; set x99 0; + set x100 0; set x101 0; set x102 0; set x103 0; + set x104 0; set x105 0; set x106 0; set x107 0; + set x108 0; set x109 0; set x110 0; set x111 0; + set x112 0; set x113 0; set x114 0; set x115 0; + set x116 0; set x117 0; set x118 0; set x119 0; + set x120 0; set x121 0; set x122 0; set x123 0; + set x124 0; set x125 0; set x126 0; set x127 0; + set x128 0; set x129 0; set x130 0; set x131 0; + set x132 0; set x133 0; set x134 0; set x135 0; + set x136 0; set x137 0; set x138 0; set x139 0; + set x140 0; set x141 0; set x142 0; set x143 0; + set x144 0; set x145 0; set x146 0; set x147 0; + set x148 0; set x149 0; set x150 0; set x151 0; + set x152 0; set x153 0; set x154 0; set x155 0; + set x156 0; set x157 0; set x158 0; set x159 0; + set x160 0; set x161 0; set x162 0; set x163 0; + set x164 0; set x165 0; set x166 0; set x167 0; + set x168 0; set x169 0; set x170 0; set x171 0; + set x172 0; set x173 0; set x174 0; set x175 0; + set x176 0; set x177 0; set x178 0; set x179 0; + set x180 0; set x181 0; set x182 0; set x183 0; + set x184 0; set x185 0; set x186 0; set x187 0; + set x188 0; set x189 0; set x190 0; set x191 0; + set x192 0; set x193 0; set x194 0; set x195 0; + set x196 0; set x197 0; set x198 0; set x199 0; + set x200 0; set x201 0; set x202 0; set x203 0; + set x204 0; set x205 0; set x206 0; set x207 0; + set x208 0; set x209 0; set x210 0; set x211 0; + set x212 0; set x213 0; set x214 0; set x215 0; + set x216 0; set x217 0; set x218 0; set x219 0; + set x220 0; set x221 0; set x222 0; set x223 0; + set x224 0; set x225 0; set x226 0; set x227 0; + set x228 0; set x229 0; set x230 0; set x231 0; + set x232 0; set x233 0; set x234 0; set x235 0; + set x236 0; set x237 0; set x238 0; set x239 0; + set x240 0; set x241 0; set x242 0; set x243 0; + set x244 0; set x245 0; set x246 0; set x247 0; + set x248 0; set x249 0; set x250 0; set x251 0; set x252 0; set x253 0; set x254 0; set x255 0; set y(0) {{1 2} {3 4}} lset y(0) {1 1} 5 @@ -253,69 +253,69 @@ test lsetComp-3.3 {lset, compiled, flat args, scalar, one-byte offset} { test lsetComp-3.4 {lset, compiled, scalar, four-byte offset} { evalInProc { - set x0 0; set x1 0; set x2 0; set x3 0; - set x4 0; set x5 0; set x6 0; set x7 0; - set x8 0; set x9 0; set x10 0; set x11 0; - set x12 0; set x13 0; set x14 0; set x15 0; - set x16 0; set x17 0; set x18 0; set x19 0; - set x20 0; set x21 0; set x22 0; set x23 0; - set x24 0; set x25 0; set x26 0; set x27 0; - set x28 0; set x29 0; set x30 0; set x31 0; - set x32 0; set x33 0; set x34 0; set x35 0; - set x36 0; set x37 0; set x38 0; set x39 0; - set x40 0; set x41 0; set x42 0; set x43 0; - set x44 0; set x45 0; set x46 0; set x47 0; - set x48 0; set x49 0; set x50 0; set x51 0; - set x52 0; set x53 0; set x54 0; set x55 0; - set x56 0; set x57 0; set x58 0; set x59 0; - set x60 0; set x61 0; set x62 0; set x63 0; - set x64 0; set x65 0; set x66 0; set x67 0; - set x68 0; set x69 0; set x70 0; set x71 0; - set x72 0; set x73 0; set x74 0; set x75 0; - set x76 0; set x77 0; set x78 0; set x79 0; - set x80 0; set x81 0; set x82 0; set x83 0; - set x84 0; set x85 0; set x86 0; set x87 0; - set x88 0; set x89 0; set x90 0; set x91 0; - set x92 0; set x93 0; set x94 0; set x95 0; - set x96 0; set x97 0; set x98 0; set x99 0; - set x100 0; set x101 0; set x102 0; set x103 0; - set x104 0; set x105 0; set x106 0; set x107 0; - set x108 0; set x109 0; set x110 0; set x111 0; - set x112 0; set x113 0; set x114 0; set x115 0; - set x116 0; set x117 0; set x118 0; set x119 0; - set x120 0; set x121 0; set x122 0; set x123 0; - set x124 0; set x125 0; set x126 0; set x127 0; - set x128 0; set x129 0; set x130 0; set x131 0; - set x132 0; set x133 0; set x134 0; set x135 0; - set x136 0; set x137 0; set x138 0; set x139 0; - set x140 0; set x141 0; set x142 0; set x143 0; - set x144 0; set x145 0; set x146 0; set x147 0; - set x148 0; set x149 0; set x150 0; set x151 0; - set x152 0; set x153 0; set x154 0; set x155 0; - set x156 0; set x157 0; set x158 0; set x159 0; - set x160 0; set x161 0; set x162 0; set x163 0; - set x164 0; set x165 0; set x166 0; set x167 0; - set x168 0; set x169 0; set x170 0; set x171 0; - set x172 0; set x173 0; set x174 0; set x175 0; - set x176 0; set x177 0; set x178 0; set x179 0; - set x180 0; set x181 0; set x182 0; set x183 0; - set x184 0; set x185 0; set x186 0; set x187 0; - set x188 0; set x189 0; set x190 0; set x191 0; - set x192 0; set x193 0; set x194 0; set x195 0; - set x196 0; set x197 0; set x198 0; set x199 0; - set x200 0; set x201 0; set x202 0; set x203 0; - set x204 0; set x205 0; set x206 0; set x207 0; - set x208 0; set x209 0; set x210 0; set x211 0; - set x212 0; set x213 0; set x214 0; set x215 0; - set x216 0; set x217 0; set x218 0; set x219 0; - set x220 0; set x221 0; set x222 0; set x223 0; - set x224 0; set x225 0; set x226 0; set x227 0; - set x228 0; set x229 0; set x230 0; set x231 0; - set x232 0; set x233 0; set x234 0; set x235 0; - set x236 0; set x237 0; set x238 0; set x239 0; - set x240 0; set x241 0; set x242 0; set x243 0; - set x244 0; set x245 0; set x246 0; set x247 0; - set x248 0; set x249 0; set x250 0; set x251 0; + set x0 0; set x1 0; set x2 0; set x3 0; + set x4 0; set x5 0; set x6 0; set x7 0; + set x8 0; set x9 0; set x10 0; set x11 0; + set x12 0; set x13 0; set x14 0; set x15 0; + set x16 0; set x17 0; set x18 0; set x19 0; + set x20 0; set x21 0; set x22 0; set x23 0; + set x24 0; set x25 0; set x26 0; set x27 0; + set x28 0; set x29 0; set x30 0; set x31 0; + set x32 0; set x33 0; set x34 0; set x35 0; + set x36 0; set x37 0; set x38 0; set x39 0; + set x40 0; set x41 0; set x42 0; set x43 0; + set x44 0; set x45 0; set x46 0; set x47 0; + set x48 0; set x49 0; set x50 0; set x51 0; + set x52 0; set x53 0; set x54 0; set x55 0; + set x56 0; set x57 0; set x58 0; set x59 0; + set x60 0; set x61 0; set x62 0; set x63 0; + set x64 0; set x65 0; set x66 0; set x67 0; + set x68 0; set x69 0; set x70 0; set x71 0; + set x72 0; set x73 0; set x74 0; set x75 0; + set x76 0; set x77 0; set x78 0; set x79 0; + set x80 0; set x81 0; set x82 0; set x83 0; + set x84 0; set x85 0; set x86 0; set x87 0; + set x88 0; set x89 0; set x90 0; set x91 0; + set x92 0; set x93 0; set x94 0; set x95 0; + set x96 0; set x97 0; set x98 0; set x99 0; + set x100 0; set x101 0; set x102 0; set x103 0; + set x104 0; set x105 0; set x106 0; set x107 0; + set x108 0; set x109 0; set x110 0; set x111 0; + set x112 0; set x113 0; set x114 0; set x115 0; + set x116 0; set x117 0; set x118 0; set x119 0; + set x120 0; set x121 0; set x122 0; set x123 0; + set x124 0; set x125 0; set x126 0; set x127 0; + set x128 0; set x129 0; set x130 0; set x131 0; + set x132 0; set x133 0; set x134 0; set x135 0; + set x136 0; set x137 0; set x138 0; set x139 0; + set x140 0; set x141 0; set x142 0; set x143 0; + set x144 0; set x145 0; set x146 0; set x147 0; + set x148 0; set x149 0; set x150 0; set x151 0; + set x152 0; set x153 0; set x154 0; set x155 0; + set x156 0; set x157 0; set x158 0; set x159 0; + set x160 0; set x161 0; set x162 0; set x163 0; + set x164 0; set x165 0; set x166 0; set x167 0; + set x168 0; set x169 0; set x170 0; set x171 0; + set x172 0; set x173 0; set x174 0; set x175 0; + set x176 0; set x177 0; set x178 0; set x179 0; + set x180 0; set x181 0; set x182 0; set x183 0; + set x184 0; set x185 0; set x186 0; set x187 0; + set x188 0; set x189 0; set x190 0; set x191 0; + set x192 0; set x193 0; set x194 0; set x195 0; + set x196 0; set x197 0; set x198 0; set x199 0; + set x200 0; set x201 0; set x202 0; set x203 0; + set x204 0; set x205 0; set x206 0; set x207 0; + set x208 0; set x209 0; set x210 0; set x211 0; + set x212 0; set x213 0; set x214 0; set x215 0; + set x216 0; set x217 0; set x218 0; set x219 0; + set x220 0; set x221 0; set x222 0; set x223 0; + set x224 0; set x225 0; set x226 0; set x227 0; + set x228 0; set x229 0; set x230 0; set x231 0; + set x232 0; set x233 0; set x234 0; set x235 0; + set x236 0; set x237 0; set x238 0; set x239 0; + set x240 0; set x241 0; set x242 0; set x243 0; + set x244 0; set x245 0; set x246 0; set x247 0; + set x248 0; set x249 0; set x250 0; set x251 0; set x252 0; set x253 0; set x254 0; set x255 0; set x {{1 2} {3 4}} lset x 1 1 5 @@ -338,69 +338,69 @@ test lsetComp-3.6 {lset, compiled, flat args, array, one-byte offset} { test lsetComp-3.7 {lset, compiled, flat args, array, four-byte offset} { evalInProc { - set x0 0; set x1 0; set x2 0; set x3 0; - set x4 0; set x5 0; set x6 0; set x7 0; - set x8 0; set x9 0; set x10 0; set x11 0; - set x12 0; set x13 0; set x14 0; set x15 0; - set x16 0; set x17 0; set x18 0; set x19 0; - set x20 0; set x21 0; set x22 0; set x23 0; - set x24 0; set x25 0; set x26 0; set x27 0; - set x28 0; set x29 0; set x30 0; set x31 0; - set x32 0; set x33 0; set x34 0; set x35 0; - set x36 0; set x37 0; set x38 0; set x39 0; - set x40 0; set x41 0; set x42 0; set x43 0; - set x44 0; set x45 0; set x46 0; set x47 0; - set x48 0; set x49 0; set x50 0; set x51 0; - set x52 0; set x53 0; set x54 0; set x55 0; - set x56 0; set x57 0; set x58 0; set x59 0; - set x60 0; set x61 0; set x62 0; set x63 0; - set x64 0; set x65 0; set x66 0; set x67 0; - set x68 0; set x69 0; set x70 0; set x71 0; - set x72 0; set x73 0; set x74 0; set x75 0; - set x76 0; set x77 0; set x78 0; set x79 0; - set x80 0; set x81 0; set x82 0; set x83 0; - set x84 0; set x85 0; set x86 0; set x87 0; - set x88 0; set x89 0; set x90 0; set x91 0; - set x92 0; set x93 0; set x94 0; set x95 0; - set x96 0; set x97 0; set x98 0; set x99 0; - set x100 0; set x101 0; set x102 0; set x103 0; - set x104 0; set x105 0; set x106 0; set x107 0; - set x108 0; set x109 0; set x110 0; set x111 0; - set x112 0; set x113 0; set x114 0; set x115 0; - set x116 0; set x117 0; set x118 0; set x119 0; - set x120 0; set x121 0; set x122 0; set x123 0; - set x124 0; set x125 0; set x126 0; set x127 0; - set x128 0; set x129 0; set x130 0; set x131 0; - set x132 0; set x133 0; set x134 0; set x135 0; - set x136 0; set x137 0; set x138 0; set x139 0; - set x140 0; set x141 0; set x142 0; set x143 0; - set x144 0; set x145 0; set x146 0; set x147 0; - set x148 0; set x149 0; set x150 0; set x151 0; - set x152 0; set x153 0; set x154 0; set x155 0; - set x156 0; set x157 0; set x158 0; set x159 0; - set x160 0; set x161 0; set x162 0; set x163 0; - set x164 0; set x165 0; set x166 0; set x167 0; - set x168 0; set x169 0; set x170 0; set x171 0; - set x172 0; set x173 0; set x174 0; set x175 0; - set x176 0; set x177 0; set x178 0; set x179 0; - set x180 0; set x181 0; set x182 0; set x183 0; - set x184 0; set x185 0; set x186 0; set x187 0; - set x188 0; set x189 0; set x190 0; set x191 0; - set x192 0; set x193 0; set x194 0; set x195 0; - set x196 0; set x197 0; set x198 0; set x199 0; - set x200 0; set x201 0; set x202 0; set x203 0; - set x204 0; set x205 0; set x206 0; set x207 0; - set x208 0; set x209 0; set x210 0; set x211 0; - set x212 0; set x213 0; set x214 0; set x215 0; - set x216 0; set x217 0; set x218 0; set x219 0; - set x220 0; set x221 0; set x222 0; set x223 0; - set x224 0; set x225 0; set x226 0; set x227 0; - set x228 0; set x229 0; set x230 0; set x231 0; - set x232 0; set x233 0; set x234 0; set x235 0; - set x236 0; set x237 0; set x238 0; set x239 0; - set x240 0; set x241 0; set x242 0; set x243 0; - set x244 0; set x245 0; set x246 0; set x247 0; - set x248 0; set x249 0; set x250 0; set x251 0; + set x0 0; set x1 0; set x2 0; set x3 0; + set x4 0; set x5 0; set x6 0; set x7 0; + set x8 0; set x9 0; set x10 0; set x11 0; + set x12 0; set x13 0; set x14 0; set x15 0; + set x16 0; set x17 0; set x18 0; set x19 0; + set x20 0; set x21 0; set x22 0; set x23 0; + set x24 0; set x25 0; set x26 0; set x27 0; + set x28 0; set x29 0; set x30 0; set x31 0; + set x32 0; set x33 0; set x34 0; set x35 0; + set x36 0; set x37 0; set x38 0; set x39 0; + set x40 0; set x41 0; set x42 0; set x43 0; + set x44 0; set x45 0; set x46 0; set x47 0; + set x48 0; set x49 0; set x50 0; set x51 0; + set x52 0; set x53 0; set x54 0; set x55 0; + set x56 0; set x57 0; set x58 0; set x59 0; + set x60 0; set x61 0; set x62 0; set x63 0; + set x64 0; set x65 0; set x66 0; set x67 0; + set x68 0; set x69 0; set x70 0; set x71 0; + set x72 0; set x73 0; set x74 0; set x75 0; + set x76 0; set x77 0; set x78 0; set x79 0; + set x80 0; set x81 0; set x82 0; set x83 0; + set x84 0; set x85 0; set x86 0; set x87 0; + set x88 0; set x89 0; set x90 0; set x91 0; + set x92 0; set x93 0; set x94 0; set x95 0; + set x96 0; set x97 0; set x98 0; set x99 0; + set x100 0; set x101 0; set x102 0; set x103 0; + set x104 0; set x105 0; set x106 0; set x107 0; + set x108 0; set x109 0; set x110 0; set x111 0; + set x112 0; set x113 0; set x114 0; set x115 0; + set x116 0; set x117 0; set x118 0; set x119 0; + set x120 0; set x121 0; set x122 0; set x123 0; + set x124 0; set x125 0; set x126 0; set x127 0; + set x128 0; set x129 0; set x130 0; set x131 0; + set x132 0; set x133 0; set x134 0; set x135 0; + set x136 0; set x137 0; set x138 0; set x139 0; + set x140 0; set x141 0; set x142 0; set x143 0; + set x144 0; set x145 0; set x146 0; set x147 0; + set x148 0; set x149 0; set x150 0; set x151 0; + set x152 0; set x153 0; set x154 0; set x155 0; + set x156 0; set x157 0; set x158 0; set x159 0; + set x160 0; set x161 0; set x162 0; set x163 0; + set x164 0; set x165 0; set x166 0; set x167 0; + set x168 0; set x169 0; set x170 0; set x171 0; + set x172 0; set x173 0; set x174 0; set x175 0; + set x176 0; set x177 0; set x178 0; set x179 0; + set x180 0; set x181 0; set x182 0; set x183 0; + set x184 0; set x185 0; set x186 0; set x187 0; + set x188 0; set x189 0; set x190 0; set x191 0; + set x192 0; set x193 0; set x194 0; set x195 0; + set x196 0; set x197 0; set x198 0; set x199 0; + set x200 0; set x201 0; set x202 0; set x203 0; + set x204 0; set x205 0; set x206 0; set x207 0; + set x208 0; set x209 0; set x210 0; set x211 0; + set x212 0; set x213 0; set x214 0; set x215 0; + set x216 0; set x217 0; set x218 0; set x219 0; + set x220 0; set x221 0; set x222 0; set x223 0; + set x224 0; set x225 0; set x226 0; set x227 0; + set x228 0; set x229 0; set x230 0; set x231 0; + set x232 0; set x233 0; set x234 0; set x235 0; + set x236 0; set x237 0; set x238 0; set x239 0; + set x240 0; set x241 0; set x242 0; set x243 0; + set x244 0; set x245 0; set x246 0; set x247 0; + set x248 0; set x249 0; set x250 0; set x251 0; set x252 0; set x253 0; set x254 0; set x255 0; set y(0) {{1 2} {3 4}} lset y(0) 1 1 5 diff --git a/tests/mathop.test b/tests/mathop.test index f6d0c00..12a4e7f 100644 --- a/tests/mathop.test +++ b/tests/mathop.test @@ -901,10 +901,10 @@ test mathop-22.2 { bitwise ops on bignums } { set exp {} foreach d {5 7 2 1 D C 1 F E 0 -D -D 8 -9 -1 -0 -E E} { if {[string match "-*" $d]} { - set d [format %X [expr 15-0x[string range $d 1 end]]] - set val [expr -0x[string repeat $d $dig]-1] + set d [format %X [expr {15-"0x[string range $d 1 end]"}]] + set val [expr {-"0x[string repeat $d $dig]"-1}] } else { - set val [expr 0x[string repeat $d $dig]] + set val [expr {"0x[string repeat $d $dig]"}] } lappend exp $val } diff --git a/tests/namespace-old.test b/tests/namespace-old.test index 1d6a805..e4715f8 100644 --- a/tests/namespace-old.test +++ b/tests/namespace-old.test @@ -749,13 +749,13 @@ test namespace-old-9.14 {imported commands can be removed} { } {{} 1 {invalid command name "cmd1"}} test namespace-old-9.15 {existing commands can't be overwritten} { proc cmd1 {x y} { - return [expr $x+$y] + return [expr {$x+$y}] } list [catch {namespace import test_ns_import::cmd?} msg] $msg \ [cmd1 3 5] } {1 {can't import command "cmd1": already exists} 8} test namespace-old-9.16 {use "-force" option to override existing commands} { - proc cmd1 {x y} { return [expr $x+$y] } + proc cmd1 {x y} { return [expr {$x+$y}] } list [cmd1 3 5] \ [namespace import -force test_ns_import::cmd?] \ [cmd1 3 5] diff --git a/tests/oo.test b/tests/oo.test index 43aa608..0f58c5d 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -1898,7 +1898,7 @@ test oo-13.5 {OO: changing an object's class: non-class to class} -setup { class oo::class } oo::define fooObj { - method x {} {expr 1+2+3} + method x {} {expr {1+2+3}} } [fooObj new] x } -cleanup { @@ -1910,7 +1910,7 @@ test oo-13.6 {OO: changing an object's class: class to non-class} -setup { } -body { set result dangling oo::define foo { - method x {} {expr 1+2+3} + method x {} {expr {1+2+3}} } oo::class create boo { superclass foo @@ -1933,7 +1933,7 @@ test oo-13.7 {OO: changing an object's class} -setup { } -body { oo::define bar method x {} {return ok} oo::define foo { - method x {} {expr 1+2+3} + method x {} {expr {1+2+3}} self mixin foo } lappend result [foo x] @@ -1947,7 +1947,7 @@ test oo-13.8 {OO: changing an object's class to itself} -setup { oo::class create foo } -body { oo::define foo { - method x {} {expr 1+2+3} + method x {} {expr {1+2+3}} } oo::objdefine foo class foo } -cleanup { diff --git a/tests/opt.test b/tests/opt.test index 0af4488..419e6bf 100644 --- a/tests/opt.test +++ b/tests/opt.test @@ -27,8 +27,8 @@ package require opt 0.4.8 set n $::tcl::OptDescN test opt-1.1 {OptKeyRegister / check that auto allocation is skipping existing keys} { - list [::tcl::OptKeyRegister {} $n] [::tcl::OptKeyRegister {} [expr $n+1]] [::tcl::OptKeyRegister {}] -} "$n [expr $n+1] [expr $n+2]" + list [::tcl::OptKeyRegister {} $n] [::tcl::OptKeyRegister {} [expr {$n+1}]] [::tcl::OptKeyRegister {}] +} "$n [expr {$n+1}] [expr {$n+2}]" test opt-2.1 {OptKeyDelete} { list [::tcl::OptKeyRegister {} testkey] \ diff --git a/tests/parse.test b/tests/parse.test index 9980015..4370acb 100644 --- a/tests/parse.test +++ b/tests/parse.test @@ -481,7 +481,7 @@ test parse-10.2 {Tcl_EvalTokens, backslash sequences} testevalex { testevalex {concat test\063\062test} } {test32test} test parse-10.3 {Tcl_EvalTokens, nested commands} testevalex { - testevalex {concat [expr 2 + 6]} + testevalex {concat [expr {2 + 6}]} } {8} test parse-10.4 {Tcl_EvalTokens, nested commands} testevalex { unset -nocomplain a @@ -499,7 +499,7 @@ test parse-10.6 {Tcl_EvalTokens, array variables} testevalex { test parse-10.7 {Tcl_EvalTokens, array variables} testevalex { unset -nocomplain a set a(12) 46 - testevalex {concat $a(1[expr 3 - 1])} + testevalex {concat $a(1[expr {3 - 1}])} } {46} test parse-10.8 {Tcl_EvalTokens, array variables} testevalex { unset -nocomplain a diff --git a/tests/parseOld.test b/tests/parseOld.test index 134a3c2..7218092 100644 --- a/tests/parseOld.test +++ b/tests/parseOld.test @@ -135,7 +135,7 @@ format %s $b } a22b test parseOld-4.4 {command substitution} { set a 7.7 - if [catch {expr int($a)}] {set a foo} + if {[catch {expr {int($a)}}]} {set a foo} set a } 7.7 diff --git a/tests/pkgMkIndex.test b/tests/pkgMkIndex.test index 8121377..ad328f8 100644 --- a/tests/pkgMkIndex.test +++ b/tests/pkgMkIndex.test @@ -315,7 +315,7 @@ namespace eval pkg2 { namespace export p2-1 } proc pkg2::p2-1 { num } { - return [expr $num * 2] + return [expr {$num * 2}] } } [file join pkg pkg2_a.tcl] @@ -328,7 +328,7 @@ namespace eval pkg2 { namespace export p2-2 } proc pkg2::p2-2 { num } { - return [expr $num * 3] + return [expr {$num * 3}] } } [file join pkg pkg2_b.tcl] @@ -409,10 +409,10 @@ namespace eval pkg3 { namespace export p3-1 p3-2 } proc pkg3::p3-1 { num } { - return {[expr $num * 2]} + return {[expr {$num * 2}]} } proc pkg3::p3-2 { num } { - return {[expr $num * 3]} + return {[expr {$num * 3}]} } } [file join pkg pkg3.tcl] @@ -520,10 +520,10 @@ namespace eval circ2 { namespace export c2-1 c2-2 } proc circ2::c2-1 { num } { - return [expr $num * [circ3::c3-1]] + return [expr {$num * [circ3::c3-1]}] } proc circ2::c2-2 { num } { - return [expr $num * [circ3::c3-2]] + return [expr {$num * [circ3::c3-2]}] } } [file join pkg circ2.tcl] diff --git a/tests/proc-old.test b/tests/proc-old.test index 79ee1fa..a92c6ab 100644 --- a/tests/proc-old.test +++ b/tests/proc-old.test @@ -25,7 +25,7 @@ catch {rename foo ""} proc tproc {} {return a; return b} test proc-old-1.1 {simple procedure call and return} {tproc} a proc tproc x { - set x [expr $x+1] + set x [expr {$x + 1}] return $x } test proc-old-1.2 {simple procedure call and return} {tproc 2} 3 @@ -49,7 +49,7 @@ test proc-old-1.6 {simple procedure call and return (shared proc body string)} { test proc-old-2.1 {local and global variables} { proc tproc x { - set x [expr $x+1] + set x [expr {$x + 1}] return $x } set x 42 @@ -57,7 +57,7 @@ test proc-old-2.1 {local and global variables} { } {7 42} test proc-old-2.2 {local and global variables} { proc tproc x { - set y [expr $x+1] + set y [expr {$x + 1}] return $y } set y 18 @@ -66,7 +66,7 @@ test proc-old-2.2 {local and global variables} { test proc-old-2.3 {local and global variables} { proc tproc x { global y - set y [expr $x+1] + set y [expr {$x + 1}] return $y } set y 189 @@ -75,7 +75,7 @@ test proc-old-2.3 {local and global variables} { test proc-old-2.4 {local and global variables} { proc tproc x { global y - return [expr $x+$y] + return [expr {$x + $y}] } set y 189 list [tproc 6] $y @@ -504,7 +504,7 @@ test proc-old-10.1 {ByteCode epoch change during recursive proc execution} { set y 20 rename expr expr.old rename expr.old expr - if $x then {t1 0} ;# recursive call after foo's code is invalidated + if {$x} then {t1 0} ;# recursive call after foo's code is invalidated return 20 } t1 1 diff --git a/tests/proc.test b/tests/proc.test index 7039dbb..4b539c4 100644 --- a/tests/proc.test +++ b/tests/proc.test @@ -100,7 +100,7 @@ test proc-1.7 {Tcl_ProcObjCmd, check that formal parameter names are not array e catch {rename p ""} } -returnCodes error -body { proc p {a(1) a(2)} { - set z [expr $a(1)+$a(2)] + set z [expr {$a(1)+$a(2)}] puts "$z=z, $a(1)=$a(1)" } } -result {formal parameter "a(1)" is an array element} diff --git a/tests/pwd.test b/tests/pwd.test index 3486e70..3d4cffd 100644 --- a/tests/pwd.test +++ b/tests/pwd.test @@ -20,9 +20,10 @@ test pwd-1.1 {simple pwd} { catch pwd } 0 test pwd-1.2 {simple pwd} { - expr [string length pwd]>0 + expr {[string length [pwd]]>0} } 1 -test pwd-1.3 {pwd takes no args} -body { + +test pwd-2.1 {pwd takes no args} -body { pwd foobar } -returnCodes error -result "wrong \# args: should be \"pwd\"" diff --git a/tests/remote.tcl b/tests/remote.tcl index 097e41f..3c2fb51 100644 --- a/tests/remote.tcl +++ b/tests/remote.tcl @@ -91,8 +91,8 @@ if {![info exists serverPort]} { if {![info exists serverPort]} { for {set i 0} {$i < $argc} {incr i} { if {[string compare -port [lindex $argv $i]] == 0} { - if {$i < [expr $argc - 1]} { - set serverPort [lindex $argv [expr $i + 1]] + if {$i < $argc - 1} { + set serverPort [lindex $argv [expr {$i + 1}]] } break } @@ -110,8 +110,8 @@ if {![info exists serverAddress]} { if {![info exists serverAddress]} { for {set i 0} {$i < $argc} {incr i} { if {[string compare -address [lindex $argv $i]] == 0} { - if {$i < [expr $argc - 1]} { - set serverAddress [lindex $argv [expr $i + 1]] + if {$i < $argc - 1} { + set serverAddress [lindex $argv [expr {$i + 1}]] } break } diff --git a/tests/socket.test b/tests/socket.test index ca60588..2060f35 100644 --- a/tests/socket.test +++ b/tests/socket.test @@ -67,7 +67,7 @@ if {"::tcltest" ni [namespace children]} { ::tcltest::loadTestedCommands -if {[expr {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]}]} { +if {[info exists ::env(TRAVIS_OSX_IMAGE)] && [string match xcode* $::env(TRAVIS_OSX_IMAGE)]} { return } @@ -939,7 +939,7 @@ test socket_$af-6.1 {accept callback error} -constraints [list socket supported_ } close $f set f [open "|[list [interpreter] $path(script)]" r+] - proc accept {s a p} {expr 10 / 0} + proc accept {s a p} {expr {10 / 0}} set s [socket -server accept -myaddr $localhost 0] puts $f [lindex [fconfigure $s -sockname] 2] close $f diff --git a/tests/subst.test b/tests/subst.test index e203ad2..8a8b3f1 100644 --- a/tests/subst.test +++ b/tests/subst.test @@ -132,20 +132,20 @@ test subst-7.3 {switches} -returnCodes error -body { } -result {bad option "-bogus": must be -nobackslashes, -nocommands, or -novariables} test subst-7.4 {switches} { set x 123 - subst -nobackslashes {abc $x [expr 1+2] \\\x41} + subst -nobackslashes {abc $x [expr {1 + 2}] \\\x41} } {abc 123 3 \\\x41} test subst-7.5 {switches} { set x 123 - subst -nocommands {abc $x [expr 1+2] \\\x41} -} {abc 123 [expr 1+2] \A} + subst -nocommands {abc $x [expr {1 + 2}] \\\x41} +} {abc 123 [expr {1 + 2}] \A} test subst-7.6 {switches} { set x 123 - subst -novariables {abc $x [expr 1+2] \\\x41} + subst -novariables {abc $x [expr {1 + 2}] \\\x41} } {abc $x 3 \A} test subst-7.7 {switches} { set x 123 - subst -nov -nob -noc {abc $x [expr 1+2] \\\x41} -} {abc $x [expr 1+2] \\\x41} + subst -nov -nob -noc {abc $x [expr {1 + 2}] \\\x41} +} {abc $x [expr {1 + 2}] \\\x41} test subst-8.1 {return in a subst} { subst {foo [return {x}; bogus code] bar} diff --git a/tests/tcltest.test b/tests/tcltest.test index fc6b183..5e2485b 100644 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -1444,7 +1444,7 @@ test tcltest-23.2 {removeFile} { file mkdir $mfdir makeFile {} t1.tmp makeFile {} et1.tmp $mfdir - if {![file exists [file join [temporaryDirectory] t1.tmp]] || \ + if {![file exists [file join [temporaryDirectory] t1.tmp]] || \ ![file exists [file join $mfdir et1.tmp]]} { error "file creation didn't work" } diff --git a/tests/trace.test b/tests/trace.test index 726590f..c1e1a24 100644 --- a/tests/trace.test +++ b/tests/trace.test @@ -166,30 +166,30 @@ test trace-1.10 {trace variable reads} { } {} test trace-1.11 {read traces that modify the array structure} { unset -nocomplain x - set x(bar) 0 - trace variable x r {set x(foo) 1 ;#} - trace variable x r {unset -nocomplain x(bar) ;#} + set x(bar) 0 + trace variable x r {set x(foo) 1 ;#} + trace variable x r {unset -nocomplain x(bar) ;#} array get x } {} test trace-1.12 {read traces that modify the array structure} { unset -nocomplain x - set x(bar) 0 - trace variable x r {unset -nocomplain x(bar) ;#} - trace variable x r {set x(foo) 1 ;#} + set x(bar) 0 + trace variable x r {unset -nocomplain x(bar) ;#} + trace variable x r {set x(foo) 1 ;#} array get x } {} test trace-1.13 {read traces that modify the array structure} { unset -nocomplain x - set x(bar) 0 - trace variable x r {set x(foo) 1 ;#} - trace variable x r {unset -nocomplain x;#} + set x(bar) 0 + trace variable x r {set x(foo) 1 ;#} + trace variable x r {unset -nocomplain x;#} list [catch {array get x} res] $res } {1 {can't read "x(bar)": no such variable}} test trace-1.14 {read traces that modify the array structure} { unset -nocomplain x - set x(bar) 0 - trace variable x r {unset -nocomplain x;#} - trace variable x r {set x(foo) 1 ;#} + set x(bar) 0 + trace variable x r {unset -nocomplain x;#} + trace variable x r {set x(foo) 1 ;#} list [catch {array get x} res] $res } {1 {can't read "x(bar)": no such variable}} @@ -421,7 +421,7 @@ test trace-5.8 {array traces fire for undefined variables} { trace add variable x array {set x(foo) 1 ;#} set res "names: [array names x]" } {names: foo} - + # Trace multiple trace types at once. test trace-6.1 {multiple ops traced at once} { @@ -769,7 +769,7 @@ test trace-13.1 {delete one trace from another} { trace add variable x read {traceTag 2} trace add variable x read {traceTag 3} trace add variable x read {traceTag 4} - trace add variable x read delTraces + trace add variable x read delTraces trace add variable x read {traceTag 5} set x set info @@ -874,7 +874,7 @@ test trace-14.5 {trace command, invalid option} { } [list 1 "bad option \"gorp\": must be add, info, remove, variable, vdelete, or vinfo"] # Again, [trace ... command] and [trace ... variable] share syntax and -# error message styles for their opList options; these loops test those +# error message styles for their opList options; these loops test those # error messages. set i 0 @@ -2106,7 +2106,7 @@ foo foo 0 1 leave} test trace-28.2 {exec traces with 'error'} { set info {} set res {} - + proc foo {} { if {[catch {bar}]} { return "error" @@ -2128,7 +2128,7 @@ test trace-28.2 {exec traces with 'error'} { trace remove execution foo {enter enterstep leave leavestep} \ [list traceExecute foo] - + list $res [join $info \n] } {{error error} {foo foo enter foo {if {[catch {bar}]} { @@ -2154,7 +2154,7 @@ foo foo 0 error leave}} test trace-28.3 {exec traces with 'return -code error'} { set info {} set res {} - + proc foo {} { if {[catch {bar}]} { return "error" @@ -2176,7 +2176,7 @@ test trace-28.3 {exec traces with 'return -code error'} { trace remove execution foo {enter enterstep leave leavestep} \ [list traceExecute foo] - + list $res [join $info \n] } {{error error} {foo foo enter foo {if {[catch {bar}]} { @@ -2206,7 +2206,7 @@ test trace-28.4 {exec traces in child with 'return -code error'} { set res [interp eval child { set info {} set res {} - + proc foo {} { if {[catch {bar}]} { return "error" @@ -2214,21 +2214,21 @@ test trace-28.4 {exec traces in child with 'return -code error'} { return "ok" } } - + proc bar {} { return -code error "msg" } - + lappend res [foo] - + trace add execution foo {enter enterstep leave leavestep} \ [list traceExecute foo] - + # With the trace active - + lappend res [foo] - + trace remove execution foo {enter enterstep leave leavestep} \ [list traceExecute foo] - + list $res }] interp delete child @@ -2314,8 +2314,8 @@ test trace-28.10 {exec trace info nonsense} { } {1 {wrong # args: should be "trace remove execution name opList command"}} test trace-29.1 {Tcl_CreateTrace, correct command and argc/argv arguments of trace proc} {testcmdtrace} { - testcmdtrace tracetest {set stuff [expr 14 + 16]} -} {{expr 14 + 16} {expr 14 + 16} {set stuff [expr 14 + 16]} {set stuff 30}} + testcmdtrace tracetest {set stuff [expr {14 + 16}]} +} {{expr {14 + 16}} {expr {14 + 16}} {set stuff [expr {14 + 16}]} {set stuff 30}} test trace-29.2 {Tcl_CreateTrace, correct command and argc/argv arguments of trace proc} {testcmdtrace} { testcmdtrace tracetest {set stuff [info tclversion]} } [concat {{info tclversion} {info tclversion} ::tcl::info::tclversion {::tcl::info::tclversion} {set stuff [info tclversion]}} [list "set stuff [info tclversion]"]] @@ -2612,7 +2612,7 @@ test trace-39 {bug #3484621: tracing Bc'ed commands} -setup { proc foo {} { incr ::traceCalls # choose a BC'ed command that is 'unlikely' to interfere with tcltest's - # internals + # internals lset ::bar 1 2 } } -body { @@ -2633,7 +2633,7 @@ test trace-39 {bug #3484621: tracing Bc'ed commands} -setup { rename dotrace {} rename foo {} } -result {3 | 0 1 1} - + test trace-39.1 {bug #3485022: tracing Bc'ed commands} -setup { set ::traceLog 0 set ::traceCalls 0 @@ -2670,7 +2670,7 @@ test trace-40.1 {execution trace errors become command errors} { catch foo m return -level 0 $m[unset m] } bar - + # Delete procedures when done, so we don't clash with other tests # (e.g. foobar will clash with 'unknown' tests). catch {rename foobar {}} diff --git a/tests/uplevel.test b/tests/uplevel.test index 5f0dd5c..fa3be92 100644 --- a/tests/uplevel.test +++ b/tests/uplevel.test @@ -17,7 +17,7 @@ if {"::tcltest" ni [namespace children]} { } proc a {x y} { - newset z [expr $x+$y] + newset z [expr {$x + $y}] return $z } proc newset {name value} { @@ -247,7 +247,7 @@ test uplevel-7.1 {var access, no LVT in either level} -setup { unset -nocomplain y z } -body { namespace eval foo { - set x 2 + set x 2 set y 2 uplevel 1 { set x 3 @@ -266,7 +266,7 @@ test uplevel-7.2 {var access, no LVT in upper level} -setup { unset -nocomplain y z } -body { proc foo {} { - set x 2 + set x 2 set y 2 uplevel 1 { set x 3 @@ -290,7 +290,7 @@ test uplevel-7.3 {var access, LVT in upper level} -setup { } } -body { proc foo {} { - set x 2 + set x 2 set y 2 uplevel 1 { set x 3 @@ -309,7 +309,7 @@ test uplevel-7.3 {var access, LVT in upper level} -setup { test uplevel-8.0 { string representation isn't generated when there is only one argument } -body { - set res {} + set res {} set script [list lindex 5] lappend res [apply {script { uplevel $script diff --git a/tests/var.test b/tests/var.test index 4c6664d..8bb55a2 100644 --- a/tests/var.test +++ b/tests/var.test @@ -451,7 +451,7 @@ test var-7.4 {Tcl_VariableObjCmd, list of vars} -setup { variable three 3 four 4 } list [lsort [info vars test_ns_var::*]] \ - [namespace eval test_ns_var {expr $three+$four}] + [namespace eval test_ns_var {expr {$three+$four}}] } -result [list [lsort {::test_ns_var::four ::test_ns_var::three ::test_ns_var::two ::test_ns_var::one}] 7] test var-7.5 {Tcl_VariableObjCmd, value for last var is optional} -setup { catch {unset a} diff --git a/tests/while-old.test b/tests/while-old.test index eddc025..f5315fb 100644 --- a/tests/while-old.test +++ b/tests/while-old.test @@ -20,7 +20,7 @@ if {"::tcltest" ni [namespace children]} { test while-old-1.1 {basic while loops} { set count 0 - while {$count < 10} {set count [expr $count+1]} + while {$count < 10} {set count [expr {$count + 1}]} set count } 10 test while-old-1.2 {basic while loops} { @@ -58,9 +58,9 @@ test while-old-2.1 {continue in while loop} { set index 0 set result {} while {$index < 5} { - if {$index == 2} {set index [expr $index+1]; continue} + if {$index == 2} {set index [expr {$index + 1}]; continue} set result [concat $result [lindex $list $index]] - set index [expr $index+1] + set index [expr {$index + 1}] } set result } {1 2 4 5} @@ -72,7 +72,7 @@ test while-old-3.1 {break in while loop} { while {$index < 5} { if {$index == 3} break set result [concat $result [lindex $list $index]] - set index [expr $index+1] + set index [expr {$index + 1}] } set result } {1 2 3} diff --git a/tests/while.test b/tests/while.test index 30aff4b..b804aa5 100644 --- a/tests/while.test +++ b/tests/while.test @@ -77,7 +77,7 @@ test while-1.9 {TclCompileWhileCmd: simple command body} -body { set a {} set i 1 while {$i<6} { - if $i==4 break + if {$i==4} break set a [concat $a $i] incr i } @@ -112,8 +112,8 @@ test while-1.12 {TclCompileWhileCmd: long command body} -body { set a {} set i 1 while {$i<6} { - if $i==4 break - if $i>5 continue + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -155,7 +155,7 @@ test while-1.13 {TclCompileWhileCmd: while command result} -body { } -result {} test while-1.14 {TclCompileWhileCmd: while command result} -body { set i 0 - set a [while {$i < 5} {if $i==3 break; incr i}] + set a [while {$i < 5} {if {$i==3} break; incr i}] return $a } -cleanup { unset a i @@ -207,9 +207,9 @@ test while-2.4 {continue tests, long command body} -body { set a {} set i 1 while {$i<6} { - if $i==2 {incr i; continue} - if $i==4 break - if $i>5 continue + if {$i==2} {incr i; continue} + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -277,9 +277,9 @@ test while-3.3 {break tests, long command body} -body { set a {} set i 1 while {$i<6} { - if $i==2 {incr i; continue} - if $i==5 break - if $i>5 continue + if {$i==2} {incr i; continue} + if {$i==5} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -295,7 +295,7 @@ test while-3.3 {break tests, long command body} -body { catch {incr i 5} msg catch {incr i -5} msg } - if $i==4 break + if {$i==4} break if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -401,7 +401,7 @@ test while-4.10 {while (not compiled): simple command body} -body { set i 1 set z while $z {$i<6} { - if $i==4 break + if {$i==4} break set a [concat $a $i] incr i } @@ -439,8 +439,8 @@ test while-4.13 {while (not compiled): long command body} -body { set z while set i 1 $z {$i<6} { - if $i==4 break - if $i>5 continue + if {$i==4} break + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -484,7 +484,7 @@ test while-4.14 {while (not compiled): while command result} -body { test while-4.15 {while (not compiled): while command result} -body { set i 0 set z while - set a [$z {$i < 5} {if $i==3 break; incr i}] + set a [$z {$i < 5} {if {$i==3} break; incr i}] return $a } -cleanup { unset a i z @@ -538,9 +538,9 @@ test while-5.4 {break tests, long command body with computed command names} -bod set i 1 set z break while {$i<6} { - if $i==2 {incr i; continue} - if $i==5 $z - if $i>5 continue + if {$i==2} {incr i; continue} + if {$i==5} $z + if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -556,7 +556,7 @@ test while-5.4 {break tests, long command body with computed command names} -bod catch {incr i 5} msg catch {incr i -5} msg } - if $i==4 $z + if {$i==4} $z if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg @@ -637,9 +637,9 @@ test while-6.5 {continue tests, long command body with computed command names} - set i 1 set z continue while {$i<6} { - if $i==2 {incr i; continue} - if $i==4 break - if $i>5 $z + if {$i==2} {incr i; continue} + if {$i==4} break + if {$i>5} $z if {$i>6 && $tcl_platform(machine)=="xxx"} { catch {set a $a} msg catch {incr i 5} msg diff --git a/tests/winDde.test b/tests/winDde.test index 1238102..2abfdd4 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -111,7 +111,7 @@ test winDde-1.1 {Settings the server's topic name} -constraints dde -body { } -result {foobar foobar self} test winDde-2.1 {Checking for other services} -constraints dde -body { - expr [llength [dde services {} {}]] >= 0 + expr {[llength [dde services {} {}]] >= 0} } -result 1 test winDde-2.2 {Checking for existence, with service and topic specified} \ -constraints dde -body { @@ -119,11 +119,11 @@ test winDde-2.2 {Checking for existence, with service and topic specified} \ } -result 1 test winDde-2.3 {Checking for existence, with only the service specified} \ -constraints dde -body { - expr [llength [dde services TclEval {}]] >= 1 + expr {[llength [dde services TclEval {}]] >= 1} } -result 1 test winDde-2.4 {Checking for existence, with only the topic specified} \ -constraints dde -body { - expr [llength [dde services {} self]] >= 1 + expr {[llength [dde services {} self]] >= 1} } -result 1 # ------------------------------------------------------------------------- diff --git a/tests/zlib.test b/tests/zlib.test index 7809482..7ddf1d7 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -140,7 +140,7 @@ test zlib-7.7 {zlib stream: Bug 25842c161} -constraints zlib -body { } -result "" # Also causes Tk Bug 10f2e7872b test zlib-7.8 {zlib stream: Bug b26e38a3e4} -constraints zlib -setup { - expr srand(12345) + expr {srand(12345)} set randdata {} for {set i 0} {$i<6001} {incr i} { append randdata [binary format c [expr {int(256*rand())}]] @@ -451,7 +451,7 @@ test zlib-8.16 {Bug 3603553: buffer transfer with large writes} -setup { # Actual data isn't very important; needs to be substantially larger than # the internal buffer (32kB) and incompressible. set largeData {} - for {set i 0;expr srand(1)} {$i < 100000} {incr i} { + for {set i 0;expr {srand(1)}} {$i < 100000} {incr i} { append largeData [lindex "a b c d e f g h i j k l m n o p" \ [expr {int(16*rand())}]] } @@ -1032,7 +1032,7 @@ test zlib-13.1 {Ticket [8af92dfb66] - zlib stream mis-expansion} -constraints zl close $chanin close $chanout } -body { - file size $pathout + file size $pathout } -cleanup { removeFile $pathout unset chanin pathin chanout pathout @@ -1069,7 +1069,7 @@ test zlib-13.2 {Ticket [f70ce1fead] - zlib multi-stream expansion} -constraints fcopy $chanin $chanout chan pop $chanin close $chanout - # + # list [file size $pathout1] [file size $pathout2] } -cleanup { close $chanin -- cgit v0.12 From f163c24b4c9dd8b0e7c72274f1c008384ea8f514 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 30 Oct 2020 13:56:15 +0000 Subject: Simplify testcases using "incr" --- tests/for-old.test | 10 +++--- tests/for.test | 102 ++++++++++++++++++++++++++--------------------------- tests/list.test | 2 +- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/tests/for-old.test b/tests/for-old.test index d68f05a..baf40fa 100644 --- a/tests/for-old.test +++ b/tests/for-old.test @@ -22,14 +22,14 @@ if {"::tcltest" ni [namespace children]} { catch {unset a i} test for-old-1.1 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { set a [concat $a $i] } set a } {1 2 3 4 5} test for-old-1.2 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} continue set a [concat $a $i] } @@ -37,7 +37,7 @@ test for-old-1.2 {for tests} { } {1 2 3 5} test for-old-1.3 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} break set a [concat $a $i] } @@ -55,12 +55,12 @@ test for-old-1.7 {for tests} { } {wrong # args: should be "for start test next command"} test for-old-1.8 {for tests} { set a {xyz} - for {set i 1} {$i<6} {set i [expr {$i+1}]} {} + for {set i 1} {$i<6} {incr i} {} set a } xyz test for-old-1.9 {for tests} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]; if {$i==4} break} { + for {set i 1} {$i<6} {incr i; if {$i==4} break} { set a [concat $a $i] } set a diff --git a/tests/for.test b/tests/for.test index 64ec22c..a13ee54 100644 --- a/tests/for.test +++ b/tests/for.test @@ -62,7 +62,7 @@ test for-1.8 {TclCompileForCmd: error compiling command body} -body { catch {unset a} test for-1.9 {TclCompileForCmd: simple command body} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} break set a [concat $a $i] } @@ -70,7 +70,7 @@ test for-1.9 {TclCompileForCmd: simple command body} { } {1 2 3} test for-1.10 {TclCompileForCmd: command body in quotes} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} "append a x" + for {set i 1} {$i<6} {incr i} "append a x" set a } {xxxxx} test for-1.11 {TclCompileForCmd: computed command body} { @@ -81,7 +81,7 @@ test for-1.11 {TclCompileForCmd: computed command body} { set bb {break} set x2 {; append a x2} set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} $x1$bb$x2 + for {set i 1} {$i<6} {incr i} $x1$bb$x2 set a } {x1} test for-1.12 {TclCompileForCmd: error in "next" command} -body { @@ -92,7 +92,7 @@ test for-1.12 {TclCompileForCmd: error in "next" command} -body { "set"*} test for-1.13 {TclCompileForCmd: long command body} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==4} break if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { @@ -144,7 +144,7 @@ test for-2.2 {TclCompileContinueCmd: continue result} { } 4 test for-2.3 {continue tests} { set a {} - for {set i 1} {$i <= 4} {set i [expr {$i+1}]} { + for {set i 1} {$i <= 4} {incr i} { if {$i == 2} continue set a [concat $a $i] } @@ -152,7 +152,7 @@ test for-2.3 {continue tests} { } {1 3 4} test for-2.4 {continue tests} { set a {} - for {set i 1} {$i <= 4} {set i [expr {$i+1}]} { + for {set i 1} {$i <= 4} {incr i} { if {$i != 2} continue set a [concat $a $i] } @@ -170,7 +170,7 @@ test for-2.5 {continue tests, nested loops} { } {1.1 1.2 2.1 3.1 4.1} test for-2.6 {continue tests, long command body} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==2} continue if {$i==4} break if {$i>5} continue @@ -246,7 +246,7 @@ test for-3.4 {break tests, nested loops} { } {1.1 1.2 2.1 3.1 4.1} test for-3.5 {break tests, long command body} { set a {} - for {set i 1} {$i<6} {set i [expr {$i+1}]} { + for {set i 1} {$i<6} {incr i} { if {$i==2} continue if {$i==5} break if {$i>5} continue @@ -303,35 +303,35 @@ proc formatMail {} { 16 {This page contains information about Tcl 7.6 and Tk4.2, which are the most recent} \ 17 {releases of the Tcl scripting language and the Tk toolkit. The first beta versions of these} \ 18 {releases were released on August 30, 1996. These releases contain only minor changes,} \ - 19 {so we hope to have only a single beta release and to go final in early October, 1996. } \ + 19 {so we hope to have only a single beta release and to go final in early October, 1996.} \ 20 {} \ 21 {} \ - 22 {What's new } \ + 22 {What's new} \ 23 {} \ 24 {The most important changes in the releases are summarized below. See the README} \ 25 {and changes files in the distributions for more complete information on what has} \ - 26 {changed, including both feature changes and bug fixes. } \ + 26 {changed, including both feature changes and bug fixes.} \ 27 {} \ 28 { There are new options to the file command for copying files (file copy),} \ 29 { deleting files and directories (file delete), creating directories (file} \ - 30 { mkdir), and renaming files (file rename). } \ + 30 { mkdir), and renaming files (file rename).} \ 31 { The implementation of exec has been improved greatly for Windows 95 and} \ - 32 { Windows NT. } \ + 32 { Windows NT.} \ 33 { There is a new memory allocator for the Macintosh version, which should be} \ - 34 { more efficient than the old one. } \ + 34 { more efficient than the old one.} \ 35 { Tk's grid geometry manager has been completely rewritten. The layout} \ 36 { algorithm produces much better layouts than before, especially where rows or} \ - 37 { columns were stretchable. } \ + 37 { columns were stretchable.} \ 38 { There are new commands for creating common dialog boxes:} \ 39 { tk_chooseColor, tk_getOpenFile, tk_getSaveFile and} \ - 40 { tk_messageBox. These use native dialog boxes if they are available. } \ + 40 { tk_messageBox. These use native dialog boxes if they are available.} \ 41 { There is a new virtual event mechanism for handling events in a more portable} \ 42 { way. See the new command event. It also allows events (both physical and} \ - 43 { virtual) to be generated dynamically. } \ + 43 { virtual) to be generated dynamically.} \ 44 {} \ 45 {Tcl 7.6 and Tk 4.2 are backwards-compatible with Tcl 7.5 and Tk 4.1 except for} \ 46 {changes in the C APIs for custom channel drivers. Scripts written for earlier releases} \ - 47 {should work on these new releases as well. } \ + 47 {should work on these new releases as well.} \ 48 {} \ 49 {Obtaining The Releases} \ 50 {} \ @@ -342,7 +342,7 @@ proc formatMail {} { 55 { Windows 3.1, Windows 95, and Windows NT: Fetch} \ 56 { ftp://ftp.sunlabs.com/pub/tcl/win42b1.exe, then execute it. The file is a} \ 57 { self-extracting executable. It will install the Tcl and Tk libraries, the wish and} \ - 58 { tclsh programs, and documentation. } \ + 58 { tclsh programs, and documentation.} \ 59 { Macintosh (both 68K and PowerPC): Fetch} \ 60 { ftp://ftp.sunlabs.com/pub/tcl/mactk4.2b1.sea.hqx. The file is in binhex format,} \ 61 { which is understood by Fetch, StuffIt, and many other Mac utilities. The} \ @@ -451,7 +451,7 @@ proc formatMail {} { set c [string length $line] } } - set newline [string range $line 0 $c] + set newline [string trimright [string range $line 0 $c]] if {! $continuation} { append result $newline $NL } else { @@ -507,76 +507,76 @@ releases of the Tcl scripting language and the Tk toolk it. The first beta versions of these releases were released on August 30, 1996. These releas es contain only minor changes, -so we hope to have only a single beta release and to +so we hope to have only a single beta release and to go final in early October, 1996. -What's new +What's new The most important changes in the releases are summariz ed below. See the README and changes files in the distributions for more complet e information on what has -changed, including both feature changes and bug fixes. +changed, including both feature changes and bug fixes. - There are new options to the file command for + There are new options to the file command for copying files (file copy), - deleting files and directories (file delete), + deleting files and directories (file delete), creating directories (file - mkdir), and renaming files (file rename). + mkdir), and renaming files (file rename). The implementation of exec has been improved great ly for Windows 95 and - Windows NT. - There is a new memory allocator for the Macintosh + Windows NT. + There is a new memory allocator for the Macintosh version, which should be - more efficient than the old one. - Tk's grid geometry manager has been completely + more efficient than the old one. + Tk's grid geometry manager has been completely rewritten. The layout algorithm produces much better layouts than before , especially where rows or - columns were stretchable. - There are new commands for creating common dialog + columns were stretchable. + There are new commands for creating common dialog boxes: tk_chooseColor, tk_getOpenFile, tk_getSaveFile and - tk_messageBox. These use native dialog boxes if + tk_messageBox. These use native dialog boxes if they are available. There is a new virtual event mechanism for handlin g events in a more portable - way. See the new command event. It also allows + way. See the new command event. It also allows events (both physical and - virtual) to be generated dynamically. + virtual) to be generated dynamically. -Tcl 7.6 and Tk 4.2 are backwards-compatible with Tcl +Tcl 7.6 and Tk 4.2 are backwards-compatible with Tcl 7.5 and Tk 4.1 except for changes in the C APIs for custom channel drivers. Scrip ts written for earlier releases -should work on these new releases as well. +should work on these new releases as well. Obtaining The Releases Binary Releases -Pre-compiled releases are available for the following +Pre-compiled releases are available for the following platforms: Windows 3.1, Windows 95, and Windows NT: Fetch - ftp://ftp.sunlabs.com/pub/tcl/win42b1.exe, then + ftp://ftp.sunlabs.com/pub/tcl/win42b1.exe, then execute it. The file is a - self-extracting executable. It will install the + self-extracting executable. It will install the Tcl and Tk libraries, the wish and - tclsh programs, and documentation. + tclsh programs, and documentation. Macintosh (both 68K and PowerPC): Fetch - ftp://ftp.sunlabs.com/pub/tcl/mactk4.2b1.sea.hqx. + ftp://ftp.sunlabs.com/pub/tcl/mactk4.2b1.sea.hqx. The file is in binhex format, - which is understood by Fetch, StuffIt, and many + which is understood by Fetch, StuffIt, and many other Mac utilities. The - unpacked file is a self-installing executable: + unpacked file is a self-installing executable: double-click on it and it will create a - folder containing all that you need to run Tcl + folder containing all that you need to run Tcl and Tk. - UNIX (Solaris 2.* and SunOS, other systems + UNIX (Solaris 2.* and SunOS, other systems soon to follow). Easy to install - binary packages are now for sale at the Sun Labs + binary packages are now for sale at the Sun Labs Tcl/Tk Shop. Check it out! } @@ -696,7 +696,7 @@ test for-6.9 {Tcl_ForObjCmd: error executing command body} -body { test for-6.10 {Tcl_ForObjCmd: simple command body} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr {$i+1}]} { + $z {set i 1} {$i<6} {incr i} { if {$i==4} break set a [concat $a $i] } @@ -705,7 +705,7 @@ test for-6.10 {Tcl_ForObjCmd: simple command body} { test for-6.11 {Tcl_ForObjCmd: command body in quotes} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr {$i+1}]} "append a x" + $z {set i 1} {$i<6} {incr i} "append a x" set a } {xxxxx} test for-6.12 {Tcl_ForObjCmd: computed command body} { @@ -717,7 +717,7 @@ test for-6.12 {Tcl_ForObjCmd: computed command body} { set bb {break} set x2 {; append a x2} set a {} - $z {set i 1} {$i<6} {set i [expr {$i+1}]} $x1$bb$x2 + $z {set i 1} {$i<6} {incr i} $x1$bb$x2 set a } {x1} test for-6.13 {Tcl_ForObjCmd: error in "next" command} -body { @@ -733,7 +733,7 @@ test for-6.13 {Tcl_ForObjCmd: error in "next" command} -body { test for-6.14 {Tcl_ForObjCmd: long command body} { set z for set a {} - $z {set i 1} {$i<6} {set i [expr {$i+1}]} { + $z {set i 1} {$i<6} {incr i} { if {$i==4} break if {$i>5} continue if {$i>6 && $tcl_platform(machine)=="xxx"} { diff --git a/tests/list.test b/tests/list.test index 8e85ed8..864fad0 100644 --- a/tests/list.test +++ b/tests/list.test @@ -108,7 +108,7 @@ proc slowsort list { set minIndex $i set min [lindex $list $i] } - set i [expr {$i - 1}] + incr i -1 } set result [concat $result [list $min]] if {$minIndex == 0} { -- cgit v0.12