1 # This file is a Tcl script to test out the procedures in the file
2 # tkGet.c. It is organized in the standard fashion for Tcl
5 # Copyright (c) 1998 Sun Microsystems, Inc.
6 # Copyright (c) 1998-1999 by Scriptics Corporation.
9 package require tcltest 2.2
10 eval tcltest::configure $argv
11 tcltest::loadTestedCommands
12 namespace import -force tcltest::test
14 test get-1.1 {Tk_GetAnchorFromObj} -setup {
17 .b configure -anchor n
22 test get-1.2 {Tk_GetAnchorFromObj} -setup {
25 .b configure -anchor ne
30 test get-1.3 {Tk_GetAnchorFromObj} -setup {
33 .b configure -anchor e
38 test get-1.4 {Tk_GetAnchorFromObj} -setup {
41 .b configure -anchor se
46 test get-1.5 {Tk_GetAnchorFromObj} -setup {
49 .b configure -anchor s
54 test get-1.6 {Tk_GetAnchorFromObj} -setup {
57 .b configure -anchor sw
62 test get-1.7 {Tk_GetAnchorFromObj} -setup {
65 .b configure -anchor w
70 test get-1.8 {Tk_GetAnchorFromObj} -setup {
73 .b configure -anchor nw
78 test get-1.9 {Tk_GetAnchorFromObj} -setup {
81 .b configure -anchor n
86 test get-1.10 {Tk_GetAnchorFromObj} -setup {
89 .b configure -anchor center
94 test get-1.11 {Tk_GetAnchorFromObj - error} -setup {
97 .b configure -anchor unknown
100 } -returnCodes {error} -result {bad anchor "unknown": must be n, ne, e, se, s, sw, w, nw, or center}
103 test get-2.1 {Tk_GetJustifyFromObj} -setup {
106 .b configure -justify left
111 test get-2.2 {Tk_GetJustifyFromObj} -setup {
114 .b configure -justify right
119 test get-2.3 {Tk_GetJustifyFromObj} -setup {
122 .b configure -justify center
127 test get-2.4 {Tk_GetJustifyFromObj - error} -setup {
130 .b configure -justify stupid
133 } -returnCodes {error} -result {bad justification "stupid": must be left, right, or center}