Skip to content

Commit 25494d3

Browse files
author
jan.nijtmans
committed
Merge 8.6
2 parents 3381979 + 8a40c50 commit 25494d3

File tree

2 files changed

+75
-75
lines changed

2 files changed

+75
-75
lines changed

tests/info.test

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ test info-1.6 {info args option} {
6161
test info-1.7 {info args option} {
6262
catch {namespace delete test_ns_info2}
6363
namespace eval test_ns_info2 {
64-
namespace import ::test_ns_info1::*
65-
list [info args p] [info args q]
64+
namespace import ::test_ns_info1::*
65+
list [info args p] [info args q]
6666
}
6767
} {x {y z}}
6868

@@ -79,8 +79,8 @@ test info-2.3 {info body option} -body {
7979
test info-2.4 {info body option} {
8080
catch {namespace delete test_ns_info2}
8181
namespace eval test_ns_info2 {
82-
namespace import ::test_ns_info1::*
83-
list [info body p] [info body q]
82+
namespace import ::test_ns_info1::*
83+
list [info body p] [info body q]
8484
}
8585
} {{return "x=$x"} {return "y=$y"}}
8686
# Prior to 8.3.0 this would cause a crash because [info body]
@@ -132,7 +132,7 @@ test info-4.1 {info commands option} -body {
132132
proc t2 {} {}
133133
set x " [info commands] "
134134
list [string match {* t1 *} $x] [string match {* t2 *} $x] \
135-
[string match {* set *} $x] [string match {* list *} $x]
135+
[string match {* set *} $x] [string match {* list *} $x]
136136
} -cleanup {unset x} -result {1 1 1 1}
137137
test info-4.2 {info commands option} -body {
138138
proc t1 {} {}
@@ -229,8 +229,8 @@ test info-6.10 {info default option} -setup {
229229
test info-6.11 {info default option} {
230230
catch {namespace delete test_ns_info2}
231231
namespace eval test_ns_info2 {
232-
namespace import ::test_ns_info1::*
233-
list [info default p x foo] $foo [info default q y bar] $bar
232+
namespace import ::test_ns_info1::*
233+
list [info default p x foo] $foo [info default q y bar] $bar
234234
}
235235
} {0 {} 1 27}
236236

@@ -248,15 +248,15 @@ test info-7.3 {info exists option} {
248248
} 1
249249
test info-7.4 {info exists option} -body {
250250
proc t1 {x} {
251-
global _nonexistent_
252-
return [info exists _nonexistent_]
251+
global _nonexistent_
252+
return [info exists _nonexistent_]
253253
}
254254
t1 2
255255
} -setup {unset -nocomplain _nonexistent_} -result 0
256256
test info-7.5 {info exists option} {
257257
proc t1 {x} {
258-
set y 47
259-
return [info exists y]
258+
set y 47
259+
return [info exists y]
260260
}
261261
t1 2
262262
} 1
@@ -284,7 +284,7 @@ test info-8.1 {info globals option} -body {
284284
set value 23
285285
set a " [info globals] "
286286
list [string match {* x *} $a] [string match {* y *} $a] \
287-
[string match {* value *} $a] [string match {* _foobar_ *} $a]
287+
[string match {* value *} $a] [string match {* _foobar_ *} $a]
288288
} -cleanup {unset x y value a} -result {1 1 1 0}
289289
test info-8.2 {info globals option} -body {
290290
set _xxx1 1
@@ -317,27 +317,27 @@ test info-9.1 {info level option} {
317317
} 0
318318
test info-9.2 {info level option} {
319319
proc t1 {a b} {
320-
set x [info le]
321-
set y [info level 1]
322-
list $x $y
320+
set x [info le]
321+
set y [info level 1]
322+
list $x $y
323323
}
324324
t1 146 testString
325325
} {1 {t1 146 testString}}
326326
test info-9.3 {info level option} {
327327
proc t1 {a b} {
328-
t2 [expr {$a*2}] $b
328+
t2 [expr {$a*2}] $b
329329
}
330330
proc t2 {x y} {
331-
list [info level] [info level 1] [info level 2] [info level -1] \
332-
[info level 0]
331+
list [info level] [info level 1] [info level 2] [info level -1] \
332+
[info level 0]
333333
}
334334
t1 146 {a {b c} {{{c}}}}
335335
} {2 {t1 146 {a {b c} {{{c}}}}} {t2 292 {a {b c} {{{c}}}}} {t1 146 {a {b c} {{{c}}}}} {t2 292 {a {b c} {{{c}}}}}}
336336
test info-9.4 {info level option} {
337337
proc t1 {} {
338-
set x [info level]
339-
set y [info level 1]
340-
list $x $y
338+
set x [info level]
339+
set y [info level 1]
340+
list $x $y
341341
}
342342
t1
343343
} {1 t1}
@@ -406,21 +406,21 @@ test info-11.2 {info loaded option} -body {
406406
test info-12.1 {info locals option} -body {
407407
set a 22
408408
proc t1 {x y} {
409-
set b 13
410-
set c testing
411-
global a
409+
set b 13
410+
set c testing
411+
global a
412412
global aa
413413
set aa 23
414-
return [info locals]
414+
return [info locals]
415415
}
416416
lsort [t1 23 24]
417417
} -cleanup {unset a aa} -result {b c x y}
418418
test info-12.2 {info locals option} {
419419
proc t1 {x y} {
420-
set xx1 2
421-
set xx2 3
422-
set y 4
423-
return [info loc x*]
420+
set xx1 2
421+
set xx2 3
422+
set y 4
423+
return [info locals x*]
424424
}
425425
lsort [t1 2 3]
426426
} {x xx1 xx2}
@@ -436,16 +436,16 @@ test info-12.5 {info locals option} {
436436
} {}
437437
test info-12.6 {info locals vs unset compiled locals} {
438438
proc t1 {lst} {
439-
foreach $lst $lst {}
440-
unset lst
441-
return [info locals]
439+
foreach $lst $lst {}
440+
unset lst
441+
return [info locals]
442442
}
443443
lsort [t1 {a b c c d e f}]
444444
} {a b c d e f}
445445
test info-12.7 {info locals with temporary variables} {
446446
proc t1 {} {
447-
foreach a {b c} {}
448-
info locals
447+
foreach a {b c} {}
448+
info locals
449449
}
450450
t1
451451
} {a}
@@ -475,7 +475,7 @@ test info-15.1 {info procs option} -body {
475475
proc t2 {} {}
476476
set x " [info procs] "
477477
list [string match {* t1 *} $x] [string match {* t2 *} $x] \
478-
[string match {* _undefined_ *} $x]
478+
[string match {* _undefined_ *} $x]
479479
} -cleanup {unset x} -result {1 1 0}
480480
test info-15.2 {info procs option} {
481481
proc _tt1 {} {}
@@ -491,9 +491,9 @@ test info-15.4 {info procs option} -setup {
491491
catch {namespace delete test_ns_info2}
492492
} -body {
493493
namespace eval test_ns_info2 {
494-
namespace import ::test_ns_info1::*
495-
proc r {} {}
496-
list [lsort [info procs]] [info procs p*]
494+
namespace import ::test_ns_info1::*
495+
proc r {} {}
496+
list [lsort [info procs]] [info procs p*]
497497
}
498498
} -result {{p q r} p}
499499
test info-15.5 {info procs option with a proc in a namespace} -setup {
@@ -503,7 +503,7 @@ test info-15.5 {info procs option with a proc in a namespace} -setup {
503503
proc p1 { arg } {
504504
puts cmd
505505
}
506-
proc p2 { arg } {
506+
proc p2 { arg } {
507507
puts cmd
508508
}
509509
}
@@ -516,7 +516,7 @@ test info-15.6 {info procs option with a pattern in a namespace} -setup {
516516
proc p1 { arg } {
517517
puts cmd
518518
}
519-
proc p2 { arg } {
519+
proc p2 { arg } {
520520
puts cmd
521521
}
522522
}
@@ -526,7 +526,7 @@ test info-15.7 {info procs option with a global shadowing proc} -setup {
526526
catch {namespace delete test_ns_info2}
527527
} -body {
528528
proc string_cmd { arg } {
529-
puts cmd
529+
puts cmd
530530
}
531531
namespace eval test_ns_info2 {
532532
proc string_cmd { arg } {
@@ -542,18 +542,18 @@ test info-15.8 {info procs option with a global shadowing proc} -setup {
542542
catch {namespace delete test_ns_info2}
543543
} -constraints knownBug -body {
544544
proc string_cmd { arg } {
545-
puts cmd
545+
puts cmd
546546
}
547547
proc string_cmd2 { arg } {
548-
puts cmd
548+
puts cmd
549549
}
550550
namespace eval test_ns_info2 {
551551
proc string_cmd { arg } {
552552
puts cmd
553553
}
554554
}
555555
namespace eval test_ns_info2 {
556-
lsort [info procs string*]
556+
lsort [info procs string*]
557557
}
558558
} -result [lsort [list string_cmd string_cmd2]]
559559

@@ -602,7 +602,7 @@ test info-18.1 {info tclversion option} -body {
602602
scan [info tclversion] "%d.%d%c" a b c
603603
} -cleanup {unset -nocomplain a b c} -result 2
604604
test info-18.2 {info tclversion option} -body {
605-
info t 2
605+
info tclv 2
606606
} -returnCodes error -result {wrong # args: should be "info tclversion"}
607607
test info-18.3 {info tclversion option} -body {
608608
unset tcl_version
@@ -617,19 +617,19 @@ test info-19.1 {info vars option} -body {
617617
set a 1
618618
set b 2
619619
proc t1 {x y} {
620-
global a b
621-
set c 33
622-
return [info vars]
620+
global a b
621+
set c 33
622+
return [info vars]
623623
}
624624
lsort [t1 18 19]
625625
} -cleanup {unset a b} -result {a b c x y}
626626
test info-19.2 {info vars option} -body {
627627
set xxx1 1
628628
set xxx2 2
629629
proc t1 {xxa y} {
630-
global xxx1 xxx2
631-
set c 33
632-
return [info vars x*]
630+
global xxx1 xxx2
631+
set c 33
632+
return [info vars x*]
633633
}
634634
lsort [t1 18 19]
635635
} -cleanup {unset xxx1 xxx2} -result {xxa xxx1 xxx2}
@@ -641,8 +641,8 @@ test info-19.4 {info vars option} -returnCodes error -body {
641641
} -result {wrong # args: should be "info vars ?pattern?"}
642642
test info-19.5 {info vars with temporary variables} {
643643
proc t1 {} {
644-
foreach a {b c} {}
645-
info vars
644+
foreach a {b c} {}
645+
info vars
646646
}
647647
t1
648648
} {a}
@@ -1599,8 +1599,8 @@ type source line 1589 file info.test cmd {info frame 0} proc ::a level 0}
15991599
test info-30.17 {bs+nl in multi-body switch, direct} {
16001600
switch -regexp -- {key } \
16011601
^key { reduce [info frame 0] ;# 1601 } \
1602-
\t### { } \
1603-
{[0-9]*} { }
1602+
\t### { } \
1603+
{[0-9]*} { }
16041604
} {type source line 1601 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
16051605

16061606
test info-30.18 {bs+nl, literal word, uplevel through proc, appended, loss of primary tracking data} {
@@ -1642,7 +1642,7 @@ test info-30.20 {bs+nl in single-body switch, direct} {
16421642
^key { reduce \
16431643
[info frame 0] }
16441644
\t### { }
1645-
{[0-9]*} { }
1645+
{[0-9]*} { }
16461646
}
16471647
} {type source line 1643 file info.test cmd {info frame 0} proc ::tcltest::RunTest}
16481648

tests/oo.test

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ test oo-0.2 {basic test of OO's ability to clean up its initial state} {
6666
} {}
6767
test oo-0.3 {basic test of OO's ability to clean up its initial state} -body {
6868
leaktest {
69-
[oo::object new] destroy
69+
[oo::object new] destroy
7070
}
7171
} -constraints memory -result 0
7272
test oo-0.4 {basic test of OO's ability to clean up its initial state} -body {
@@ -1581,24 +1581,24 @@ test oo-7.9 {OO: defining inheritance in namespaces} -setup {
15811581
test oo-7.10 {OO: next after object deletion, bug [135804138e]} -setup {
15821582
set ::result ""
15831583
oo::class create c1 {
1584-
method m1 {} {
1585-
lappend ::result c1::m1
1586-
}
1584+
method m1 {} {
1585+
lappend ::result c1::m1
1586+
}
15871587
}
15881588
oo::class create c2 {
1589-
superclass c1
1590-
destructor {
1591-
lappend ::result c2::destructor
1592-
my m1
1593-
lappend ::result /c2::destructor
1594-
}
1595-
method m1 {} {
1596-
lappend ::result c2::m1
1597-
rename [self] {}
1598-
lappend ::result no-self
1599-
next
1600-
lappend ::result /c2::m1
1601-
}
1589+
superclass c1
1590+
destructor {
1591+
lappend ::result c2::destructor
1592+
my m1
1593+
lappend ::result /c2::destructor
1594+
}
1595+
method m1 {} {
1596+
lappend ::result c2::m1
1597+
rename [self] {}
1598+
lappend ::result no-self
1599+
next
1600+
lappend ::result /c2::m1
1601+
}
16021602
}
16031603
} -body {
16041604
c2 create o
@@ -3102,7 +3102,7 @@ test oo-18.8 {OO: define/self command support} -setup {
31023102
test oo-18.9 {OO: define/self command support} -setup {
31033103
oo::class create parent
31043104
set c [oo::class create now_this_is_a_very_very_long_class_name_indeed {
3105-
superclass parent
3105+
superclass parent
31063106
}]
31073107
} -body {
31083108
catch {oo::define $c {error err}} msg opt
@@ -3985,7 +3985,7 @@ test oo-27.6 {variables declaration - non-interference of levels} -setup {
39853985
foo create bar
39863986
oo::objdefine bar {
39873987
variable y!
3988-
method y {} {list [next] [incr y!] [info var] [info local]}
3988+
method y {} {list [next] [incr y!] [info var] [info locals]}
39893989
export eval
39903990
}
39913991
bar y

0 commit comments

Comments
 (0)