summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/button.test38
-rw-r--r--tests/entry.test8
-rw-r--r--tests/scale.test2
-rw-r--r--tests/spinbox.test8
-rw-r--r--tests/ttk/entry.test2
-rw-r--r--tests/ttk/progressbar.test2
-rw-r--r--tests/ttk/scale.test2
-rw-r--r--tests/ttk/ttk.test8
8 files changed, 35 insertions, 35 deletions
diff --git a/tests/button.test b/tests/button.test
index b15614f..260cd95 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -2910,7 +2910,7 @@ test button-3.23 {ButtonWidgetCmd procedure, "deselect" option} -body {
test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
.c deselect
} -cleanup {
destroy .c
@@ -2919,7 +2919,7 @@ test button-3.24 {ButtonWidgetCmd procedure, "deselect" option} -body {
test button-3.25 {ButtonWidgetCmd procedure, "deselect" option} -body {
checkbutton .c -variable checkvar -onvalue 1 -offvalue 0
set checkvar 1
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
catch {.c deselect}
list $errorInfo $checkvar
} -cleanup {
@@ -2932,7 +2932,7 @@ test button-3.25 {ButtonWidgetCmd procedure, "deselect" option} -body {
test button-3.26 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
- trace variable radiovar w bogusTrace
+ trace add variable radiovar write bogusTrace
.r deselect
} -cleanup {
destroy .r
@@ -2941,7 +2941,7 @@ test button-3.26 {ButtonWidgetCmd procedure, "deselect" option} -body {
test button-3.27 {ButtonWidgetCmd procedure, "deselect" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar red
- trace variable radiovar w bogusTrace
+ trace add variable radiovar write bogusTrace
catch {.r deselect}
list $errorInfo $radiovar
} -cleanup {
@@ -3070,7 +3070,7 @@ test button-3.43 {ButtonWidgetCmd procedure, "select" option} -body {
test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
- trace variable radiovar w bogusTrace
+ trace add variable radiovar write bogusTrace
.r select
} -cleanup {
destroy .r
@@ -3079,7 +3079,7 @@ test button-3.44 {ButtonWidgetCmd procedure, "select" option} -body {
test button-3.45 {ButtonWidgetCmd procedure, "select" option} -body {
radiobutton .r -variable radiovar -value red
set radiovar yellow
- trace variable radiovar w bogusTrace
+ trace add variable radiovar write bogusTrace
catch {.r select}
list $errorInfo $radiovar
} -cleanup {
@@ -3131,7 +3131,7 @@ test button-3.50 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
.c toggle
} -cleanup {
destroy .c
@@ -3140,7 +3140,7 @@ test button-3.51 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar xyz
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
@@ -3153,7 +3153,7 @@ test button-3.52 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
.c toggle
} -cleanup {
trace vdelete checkvar w bogusTrace
@@ -3162,7 +3162,7 @@ test button-3.53 {ButtonWidgetCmd procedure, "toggle" option} -body {
test button-3.54 {ButtonWidgetCmd procedure, "toggle" option} -body {
checkbutton .c -variable checkvar -onvalue xyz -offvalue abc
set checkvar abc
- trace variable checkvar w bogusTrace
+ trace add variable checkvar write bogusTrace
catch {.c toggle}
list $errorInfo $checkvar
} -cleanup {
@@ -3304,7 +3304,7 @@ test button-5.9 {ConfigureButton - setting selected state from variable} -setup
test button-5.10 {ConfigureButton - error in setting variable} -setup {
unset -nocomplain x
} -body {
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
radiobutton .r -variable x
} -cleanup {
destroy .r
@@ -3337,7 +3337,7 @@ test button-5.13 {ConfigureButton - using current value of variable} -body {
test button-5.14 {ConfigureButton - variable handling} -setup {
unset -nocomplain x
} -body {
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
radiobutton .r -text foo -textvariable x
} -cleanup {
trace vdelete x w bogusTrace
@@ -3346,7 +3346,7 @@ test button-5.14 {ConfigureButton - variable handling} -setup {
test button-5.15 {ConfigureButton - variable handling} -setup {
unset -nocomplain x
} -body {
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
catch {radiobutton .r -text foo -textvariable x}
return $x
} -cleanup {
@@ -3538,7 +3538,7 @@ test button-8.2 {TkInvokeButton procedure} -setup {
set x 0
} -body {
checkbutton .c -variable x
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
.c invoke
} -cleanup {
destroy .c
@@ -3548,7 +3548,7 @@ test button-8.3 {TkInvokeButton procedure} -setup {
set x 0
} -body {
checkbutton .c -variable x
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
catch {.c invoke}
return $x
} -cleanup {
@@ -3559,7 +3559,7 @@ test button-8.4 {TkInvokeButton procedure} -setup {
set x 1
} -body {
checkbutton .c -variable x
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
.c invoke
} -cleanup {
destroy .c
@@ -3569,7 +3569,7 @@ test button-8.5 {TkInvokeButton procedure} -setup {
set x 1
} -body {
checkbutton .c -variable x
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
catch {.c invoke}
return $x
} -cleanup {
@@ -3593,7 +3593,7 @@ test button-8.6 {TkInvokeButton procedure} -setup {
test button-8.7 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
.r invoke
} -cleanup {
destroy .r
@@ -3602,7 +3602,7 @@ test button-8.7 {TkInvokeButton procedure} -body {
test button-8.8 {TkInvokeButton procedure} -body {
radiobutton .r -variable x -value red
set x green
- trace variable x w bogusTrace
+ trace add variable x write bogusTrace
catch {.r invoke}
list $errorInfo $x
} -cleanup {
diff --git a/tests/entry.test b/tests/entry.test
index e5fdbb6..54ae174 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -17,7 +17,7 @@ proc scroll args {
global scrollInfo
set scrollInfo $args
}
-# For trace variable
+# For trace add variable
proc override args {
global x
set x 12345
@@ -1626,7 +1626,7 @@ test entry-5.4 {ConfigureEntry procedure, -textvariable} -setup {
unset -nocomplain x
entry .e
} -body {
- trace variable x w override
+ trace add variable x write override
.e insert 0 "Some text"
.e configure -textvariable x
list $x [.e get]
@@ -2353,7 +2353,7 @@ test entry-8.18 {DeleteChars procedure} -setup {
test entry-9.1 {EntryValueChanged procedure} -setup {
unset -nocomplain x
} -body {
- trace variable x w override
+ trace add variable x write override
entry .e -textvariable x -width 0
.e insert 0 foo
list $x [.e get]
@@ -3551,7 +3551,7 @@ test entry-22.2 {lost namespaced textvar} -body {
test entry-23.1 {error in trace proc attached to the textvariable} -setup {
destroy .e
} -body {
- trace variable myvar w traceit
+ trace add variable myvar write traceit
proc traceit args {error "Intentional error here!"}
entry .e -textvariable myvar
catch {.e insert end mystring} result1
diff --git a/tests/scale.test b/tests/scale.test
index 8a459e8..53e7f72 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -1091,7 +1091,7 @@ test scale-13.6 {SetScaleValue procedure} -body {
.s set 50
update
- trace variable y w varTrace
+ trace add variable y write varTrace
set traceInfo empty
set x untouched
.s set 50
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 409b1f8..e04da0d 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -17,7 +17,7 @@ proc scroll args {
global scrollInfo
set scrollInfo $args
}
-# For trace variable
+# For trace add variable
proc override args {
global x
set x 12345
@@ -1952,7 +1952,7 @@ test spinbox-5.4 {ConfigureSpinbox procedure, -textvariable} -setup {
unset -nocomplain x
spinbox .e
} -body {
- trace variable x w override
+ trace add variable x write override
.e insert 0 "Some text"
.e configure -textvariable x
list $x [.e get]
@@ -2643,7 +2643,7 @@ test spinbox-8.18 {DeleteChars procedure} -setup {
test spinbox-9.1 {SpinboxValueChanged procedure} -setup {
unset -nocomplain x
} -body {
- trace variable x w override
+ trace add variable x write override
spinbox .e -textvariable x -width 0
.e insert 0 foo
list $x [.e get]
@@ -3865,7 +3865,7 @@ test spinbox-23.1 {selection present while disabled, bug 637828} -body {
test spinbox-24.1 {error in trace proc attached to the textvariable} -setup {
destroy .s
} -body {
- trace variable myvar w traceit
+ trace add variable myvar write traceit
proc traceit args {error "Intentional error here!"}
spinbox .s -textvariable myvar -from 1 -to 10
catch {.s set mystring} result1
diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test
index 61d28cf..fd4cddf 100644
--- a/tests/ttk/entry.test
+++ b/tests/ttk/entry.test
@@ -246,7 +246,7 @@ test entry-6.1 {Update linked variable in write trace} -body {
}
catch {destroy .e}
set x ""
- trace variable x w override
+ trace add variable x write override
ttk::entry .e -textvariable x
.e insert 0 "Some text"
set result [list $x [.e get]]
diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test
index 7cb174c..9f9e5f9 100644
--- a/tests/ttk/progressbar.test
+++ b/tests/ttk/progressbar.test
@@ -74,7 +74,7 @@ test progressbar-2.4 "step with linked variable" -body {
} -result 6.0
test progressbar-2.5 "error in write trace" -body {
- trace variable PB w { error "YIPES!" ;# }
+ trace add variable PB write { error "YIPES!" ;# }
.pb step
set PB ;# NOTREACHED
} -cleanup { unset PB } -returnCodes error -match glob -result "*YIPES!"
diff --git a/tests/ttk/scale.test b/tests/ttk/scale.test
index 0851cb6..08143e2 100644
--- a/tests/ttk/scale.test
+++ b/tests/ttk/scale.test
@@ -4,7 +4,7 @@ namespace import -force tcltest::*
loadTestedCommands
test scale-1.0 "Self-destruction" -body {
- trace variable v w { destroy .s ;# }
+ trace add variable v write { destroy .s ;# }
ttk::scale .s -variable v
pack .s ; update
.s set 1 ; update
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index c417132..0f80487 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -29,7 +29,7 @@ proc selfdestruct {w args} {
}
test ttk-6.1 "Self-destructing checkbutton" -body {
pack [ttk::checkbutton .sd -text "Self-destruction" -variable ::sd]
- trace variable sd w [list selfdestruct .sd]
+ trace add variable sd write [list selfdestruct .sd]
update
.sd invoke
} -returnCodes error
@@ -41,7 +41,7 @@ test ttk-6.2 "Checkbutton self-destructed" -body {
test ttk-6.4 "Destroy widget in configure" -setup {
set OUCH ouch
- trace variable OUCH r { kill.b }
+ trace add variable OUCH read { kill.b }
proc kill.b {args} { destroy .b }
} -cleanup {
unset OUCH
@@ -111,7 +111,7 @@ test ttk-construction-failure-1 "Excercise construction failure path" -setup {
test ttk-construction-failure-2 "Destroy widget in constructor" -setup {
set OUCH ouch
- trace variable OUCH r { kill.b }
+ trace add variable OUCH read { kill.b }
proc kill.b {args} { destroy .b }
} -cleanup {
unset OUCH
@@ -600,7 +600,7 @@ test ttk-15.1 {Bug 3062331} -setup {
} -body {
set Y {}
ttk::button .b -textvariable Y
- trace variable Y u "destroy .b; #"
+ trace add variable Y unset "destroy .b; #"
unset Y
} -cleanup {
destroy .b