summaryrefslogtreecommitdiffstats
path: root/tests/winDialog.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winDialog.test')
-rwxr-xr-xtests/winDialog.test42
1 files changed, 21 insertions, 21 deletions
diff --git a/tests/winDialog.test b/tests/winDialog.test
index e70ae3f..e0daf24 100755
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -3,9 +3,9 @@
# the common dialog boxes. It is organized in the standard
# fashion for Tcl tests.
#
-# Copyright (c) 1997 Sun Microsystems, Inc.
-# Copyright (c) 1998-1999 by Scriptics Corporation.
-# Copyright (c) 1998-1999 ActiveState Corporation.
+# Copyright © 1997 Sun Microsystems, Inc.
+# Copyright © 1998-1999 by Scriptics Corporation.
+# Copyright © 1998-1999 ActiveState Corporation.
package require tcltest 2.2
namespace import ::tcltest::*
@@ -118,7 +118,7 @@ test winDialog-1.1 {Tk_ChooseColorObjCmd} -constraints {
then {
Click cancel
}
-} -result {0}
+} -result 0
test winDialog-1.2 {Tk_ChooseColorObjCmd} -constraints {
testwinevent
} -body {
@@ -161,7 +161,7 @@ test winDialog-1.5 {Tk_ChooseColorObjCmd: -title} -constraints {
set x {}
start {
set clr [tk_chooseColor -initialcolor "#ff9933" \
- -title "\u041f\u0440\u0438\u0432\u0435\u0442"]
+ -title "Привет"]
}
then {
if {[catch {
@@ -171,7 +171,7 @@ test winDialog-1.5 {Tk_ChooseColorObjCmd: -title} -constraints {
lappend x [Click ok]
}
lappend x $clr
-} -result [list "\u041f\u0440\u0438\u0432\u0435\u0442" 0 "#ff9933"]
+} -result [list "Привет" 0 "#ff9933"]
test winDialog-1.6 {Tk_ChooseColorObjCmd: -parent} -constraints {
testwinevent
} -setup {
@@ -229,7 +229,7 @@ test winDialog-5.1 {GetFileName: no arguments} -constraints {
then {
Click cancel
}
-} -result {0}
+} -result 0
test winDialog-5.2 {GetFileName: one argument} -constraints {
nt
} -body {
@@ -242,7 +242,7 @@ test winDialog-5.3 {GetFileName: many arguments} -constraints {
then {
Click cancel
}
-} -result {0}
+} -result 0
test winDialog-5.4 {GetFileName: Tcl_GetIndexFromObj() != TCL_OK} -constraints {
nt
} -body {
@@ -259,7 +259,7 @@ test winDialog-5.5 {GetFileName: Tcl_GetIndexFromObj() == TCL_OK} -constraints {
# https://core.tcl-lang.org/tk/tktview/4a0451f5291b3c9168cc560747dae9264e1d2ef6
# $x is expected to be empty
append x $y
-} -result {0}
+} -result 0
test winDialog-5.6 {GetFileName: valid option, but missing value} -constraints {
nt
} -body {
@@ -545,7 +545,7 @@ test winDialog-5.12.3 {tk_getSaveFile: initial directory: .} -constraints {
test winDialog-5.12.4 {tk_getSaveFile: initial directory: unicode} -constraints {
nt testwinevent
} -body {
- set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"]
+ set dir [tcltest::makeDirectory "ŧéŝŧ"]
unset -nocomplain x
start {set x [tk_getSaveFile \
-initialdir $dir \
@@ -631,7 +631,7 @@ test winDialog-5.12.8 {tk_getOpenFile: initial directory: .} -constraints {
test winDialog-5.12.9 {tk_getOpenFile: initial directory: unicode} -constraints {
nt testwinevent
} -body {
- set dir [tcltest::makeDirectory "\u0167\u00e9\u015d\u0167"]
+ set dir [tcltest::makeDirectory "ŧéŝŧ"]
set path [tcltest::makeFile "" testfile $dir]
unset -nocomplain x
start {set x [tk_getOpenFile \
@@ -726,7 +726,7 @@ test winDialog-5.16 {GetFileName: parent} -constraints {
destroy .t
}
return $x
-} -result {1}
+} -result 1
test winDialog-5.17 {GetFileName: title} -constraints {
nt testwinevent
} -body {
@@ -736,7 +736,7 @@ test winDialog-5.17 {GetFileName: title} -constraints {
then {
Click cancel
}
-} -result {0}
+} -result 0
if {[vista?]} {
# In the newer file dialogs, the file type widget does not even exist
# if no file types specified
@@ -841,18 +841,18 @@ test winDialog-5.24 {GetFileName: file types: MakeFilter() succeeds} -constraint
Click cancel
}
return $x
-} -result {0}
+} -result 0
test winDialog-5.25 {GetFileName: file types: MakeFilter() succeeds} -constraints {
nt
} -body {
# MacOS type that is correct, but has embedded high-bit chars.
- start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {\u2022\u2022\u2022\u2022}}}}]}
+ start {set x [catch {tk_getSaveFile -filetypes {{"foo" .foo {••••}}}}]}
then {
Click cancel
}
return $x
-} -result {0}
+} -result 0
test winDialog-6.1 {MakeFilter} -constraints {emptyTest nt} -body {}
@@ -877,7 +877,7 @@ test winDialog-9.1 {Tk_ChooseDirectoryObjCmd: no arguments} -constraints {
}]
# $x should be "" on a Cancel
append x $y
-} -result {0}
+} -result 0
test winDialog-9.2 {Tk_ChooseDirectoryObjCmd: one argument} -constraints {
nt
} -body {
@@ -892,7 +892,7 @@ test winDialog-9.3 {Tk_ChooseDirectoryObjCmd: many arguments} -constraints {
then {
Click cancel
}
-} -result {0}
+} -result 0
test winDialog-9.4 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() != TCL_OK} -constraints {
nt
} -body {
@@ -905,7 +905,7 @@ test winDialog-9.5 {Tk_ChooseDirectoryObjCmd: Tcl_GetIndexFromObj() == TCL_OK} -
then {
Click cancel
}
-} -result {0}
+} -result 0
test winDialog-9.6 {Tk_ChooseDirectoryObjCmd: valid option, but missing value} -constraints {
nt
} -body {
@@ -1033,7 +1033,7 @@ test winDialog-10.9 {Tk_FontchooserObjCmd: -title} -constraints {
} -body {
start {
tk fontchooser configure -command ApplyFont \
- -title "\u041f\u0440\u0438\u0432\u0435\u0442"
+ -title "Привет"
tk fontchooser show
}
then {
@@ -1041,7 +1041,7 @@ test winDialog-10.9 {Tk_FontchooserObjCmd: -title} -constraints {
Click cancel
}
set a(text)
-} -result "\u041f\u0440\u0438\u0432\u0435\u0442"
+} -result "Привет"
if {[testConstraint testwinevent]} {
catch {testwinevent debug 0}