-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathmenu.test
More file actions
4324 lines (4033 loc) · 126 KB
/
menu.test
File metadata and controls
4324 lines (4033 loc) · 126 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This file is a Tcl script to test menus in Tk.
#
# Copyright © 1995-1997 Sun Microsystems, Inc.
# Copyright © 1998-1999 Scriptics Corporation.
# All rights reserved.
#
# TESTFILE INITIALIZATION
#
package require tcltest 2.2; # needed in mode -singleproc 0
# Load the main script main.tcl, which takes care of:
# - setup for the application and the root window
# - importing commands from the tcltest namespace
# - loading of the testutils mechanism along with its utility procs
# - loading of Tk specific test constraints (additionally to constraints
# provided by the package tcltest)
source [file join [tcltest::configure -testdir] main.tcl]
# Ensure a pristine initial window state
resetWindows
# Import utility procs for specific functional areas
testutils import image
imageInit
#
# TESTS
#
test menu-1.1 {Tk_MenuCmd procedure} -body {
menu
} -returnCodes error -result {wrong # args: should be "menu pathName ?-option value ...?"}
test menu-1.2 {Tk_MenuCmd procedure} -body {
menu bogus
} -returnCodes error -result {bad window path name "bogus"}
test menu-1.3 {Tk_MenuCmd procedure} -body {
destroy .m1
menu .m1 foo
} -returnCodes error -result {unknown option "foo"}
test menu-1.4 {Tk_MenuCmd procedure} -body {
destroy .m1
menu .m1
} -cleanup {
deleteWindows
} -result {.m1}
test menu-1.5 {Tk_MenuCmd - creating menubar} -setup {
destroy .m1
} -body {
menu .m1
.m1 add cascade -label Test -menu ""
list [. configure -menu .m1] [. configure -menu ""]
} -cleanup {
deleteWindows
} -result {{} {}}
test menu-1.6 {Tk_MenuCmd procedure menu ref no cascade} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
menu .m1
} -cleanup {
deleteWindows
} -result {.m1}
test menu-1.7 {Tk_MenuCmd procedure one clone cascade} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
menu .m1
.m1 add cascade -menu .m2
menu .m2
} -cleanup {
deleteWindows
} -result {.m2}
test menu-1.8 {Tk_MenuCmd procedure two clone cascades} -setup {
deleteWindows
} -body {
menu .m1
.m1 add cascade -menu .m2
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
menu .m2
} -cleanup {
deleteWindows
} -result {.m2}
test menu-1.9 {Tk_MenuCmd procedure two clone cascades different order} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
menu .m1
.m1 add cascade -menu .m2
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
list [menu .m2]
} -cleanup {
deleteWindows
} -result {.m2}
test menu-1.10 {Tk_MenuCmd procedure two clone cascades menus last} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
menu .m1
.m1 add cascade -menu .m2
list [menu .m2]
} -cleanup {
deleteWindows
} -result {.m2}
test menu-1.11 {Tk_MenuCmd procedure three clones cascades} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
toplevel .t4 -menu .m1
wm geometry .t4 +0+0
menu .m1
.m1 add cascade -menu .m2
list [menu .m2]
} -cleanup {
deleteWindows
} -result {.m2}
test menu-1.12 {Tk_MenuCmd procedure} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
list [menu .m1]
} -cleanup {
deleteWindows
} -result {.m1}
test menu-1.13 {Tk_MenuCmd procedure} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
list [menu .m1]
} -cleanup {
deleteWindows
} -result {.m1}
test menu-1.14 {Tk_MenuCmd procedure} -setup {
deleteWindows
} -body {
toplevel .t2 -menu .m1
wm geometry .t2 +0+0
toplevel .t3 -menu .m1
wm geometry .t3 +0+0
toplevel .t4 -menu .m1
wm geometry .t4 +0+0
list [menu .m1]
} -cleanup {
deleteWindows
} -result {.m1}
#
# COMMON TEST SETUP
#
# For tests 2.1 - 2.30
#
destroy .m1
menu .m1
test menu-2.1 {configuration options -activebackground #012345} -body {
.m1 configure -activebackground #012345
.m1 cget -activebackground
} -result {#012345}
test menu-2.2 {configuration options -activebackground non-existent} -body {
.m1 configure -activebackground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.3 {configuration options -activeborderwidth 1.3} -body {
.m1 configure -activeborderwidth 1.3
.m1 cget -activeborderwidth
} -result {1.3}
test menu-2.4 {configuration options -activeborderwidth badValue} -body {
.m1 configure -activeborderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
test menu-2.5 {configuration options -activeforeground #ff0000} -body {
.m1 configure -activeforeground #ff0000
.m1 cget -activeforeground
} -result {#ff0000}
test menu-2.6 {configuration options -activeforeground non-existent} -body {
.m1 configure -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.6a {configuration options -activerelief sunken} -body {
.m1 configure -activerelief sunken
.m1 cget -activerelief
} -result {sunken}
test menu-2.6b {configuration options -activerelief badValue} -body {
.m1 configure -activerelief badValue
} -returnCodes error -result {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}
test menu-2.7 {configuration options -background #ff0000} -body {
.m1 configure -background #ff0000
.m1 cget -background
} -result {#ff0000}
test menu-2.8 {configuration options -background non-existent} -body {
.m1 configure -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.9 {configuration options -bg #110022} -body {
.m1 configure -bg #110022
.m1 cget -bg
} -result {#110022}
test menu-2.10 {configuration options -bg bogus} -body {
.m1 configure -bg bogus
} -returnCodes error -result {unknown color name "bogus"}
test menu-2.11 {configuration options -borderwidth 1.3} -body {
.m1 configure -borderwidth 1.3
.m1 cget -borderwidth
} -result {1.3}
test menu-2.12 {configuration options -borderwidth badValue} -body {
.m1 configure -borderwidth badValue
} -returnCodes error -result {expected screen distance but got "badValue"}
test menu-2.13 {configuration options -cursor arrow} -body {
.m1 configure -cursor arrow
.m1 cget -cursor
} -result {arrow}
test menu-2.14 {configuration options -cursor badValue} -body {
.m1 configure -cursor badValue
} -returnCodes error -result {bad cursor spec "badValue"}
test menu-2.15 {configuration options -disabledforeground #00ff00} -body {
.m1 configure -disabledforeground #00ff00
.m1 cget -disabledforeground
} -result {#00ff00}
test menu-2.16 {configuration options -disabledforeground xyzzy} -body {
.m1 configure -disabledforeground xyzzy
} -returnCodes error -result {unknown color name "xyzzy"}
test menu-2.17 {configuration options -fg #110022} -body {
.m1 configure -fg #110022
.m1 cget -fg
} -result {#110022}
test menu-2.18 {configuration options -fg bogus} -body {
.m1 configure -fg bogus
} -returnCodes error -result {unknown color name "bogus"}
test menu-2.19 {configuration options -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*} -body {
.m1 configure -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
.m1 cget -font
} -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*}
test menu-2.20 {configuration options -foreground #110022} -body {
.m1 configure -foreground #110022
.m1 cget -foreground
} -result {#110022}
test menu-2.21 {configuration options -foreground bogus} -body {
.m1 configure -foreground bogus
} -returnCodes error -result {unknown color name "bogus"}
test menu-2.22 {configuration options -postcommand {any old string}} -body {
.m1 configure -postcommand {any old string}
.m1 cget -postcommand
} -result {any old string}
test menu-2.23 {configuration options -relief groove} -body {
.m1 configure -relief groove
.m1 cget -relief
} -result {groove}
test menu-2.24 {configuration options -relief 1.5} -body {
.m1 configure -relief 1.5
} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken}
test menu-2.25 {configuration options -selectcolor #110022} -body {
.m1 configure -selectcolor #110022
.m1 cget -selectcolor
} -result {#110022}
test menu-2.26 {configuration options -selectcolor bogus} -body {
.m1 configure -selectcolor bogus
} -returnCodes error -result {unknown color name "bogus"}
test menu-2.27 {configuration options -takefocus {any string}} -body {
.m1 configure -takefocus {any string}
.m1 cget -takefocus
} -result {any string}
test menu-2.28 {configuration options -tearoff 0} -body {
.m1 configure -tearoff 0
.m1 cget -tearoff
} -result 0
test menu-2.29 {configuration options -tearoff 1} -body {
.m1 configure -tearoff 1
.m1 cget -tearoff
} -result 1
test menu-2.30 {configuration options -tearoffcommand {any old string}} -body {
.m1 configure -tearoffcommand {any old string}
.m1 cget -tearoffcommand
} -result {any old string}
#
# COMMON TEST SETUP
#
# For tests 2.31 - 2.228
#
# We need to test all of the options with all of the different types of
# menu entries. The following code sets up .m1 with 6 items. It then
# runs through the 2.31 - 2.228 tests below
# index 0 is tearoff, 1 command, 2 cascade, 3 separator, 4 checkbutton,
# 5 radiobutton
deleteWindows
menu .m1 -tearoff 1
.m1 add command -label "command"
menu .m2 -tearoff 1
.m2 add command -label "test"
.m1 add cascade -label "cascade" -menu .m2
.m1 add separator
.m1 add checkbutton -label "checkbutton" -variable check -onvalue on -offvalue off
.m1 add radiobutton -label "radiobutton" -variable radio
set earthPhotoFile [file join [file dirname [info script]] earth.gif]
image create photo image1 -file $earthPhotoFile
test menu-2.31 {entry configuration options 0 -activebackground #012345 tearoff} -body {
.m1 entryconfigure 0 -activebackground #012345
} -returnCodes error -result {unknown option "-activebackground"}
test menu-2.32 {entry configuration options 1 -activebackground #012345 command} -body {
.m1 entryconfigure 1 -activebackground #012345
lindex [.m1 entryconfigure 1 -activebackground] 4
} -result {#012345}
test menu-2.33 {entry configuration options 2 -activebackground #012345 cascade} -body {
.m1 entryconfigure 2 -activebackground #012345
lindex [.m1 entryconfigure 2 -activebackground] 4
} -result {#012345}
test menu-2.34 {entry configuration options 3 -activebackground #012345 separator} -body {
.m1 entryconfigure 3 -activebackground #012345
} -returnCodes error -result {unknown option "-activebackground"}
test menu-2.35 {entry configuration options 4 -activebackground #012345 checkbutton} -body {
.m1 entryconfigure 4 -activebackground #012345
lindex [.m1 entryconfigure 4 -activebackground] 4
} -result {#012345}
test menu-2.36 {entry configuration options 5 -activebackground #012345 radiobutton} -body {
.m1 entryconfigure 5 -activebackground #012345
lindex [.m1 entryconfigure 5 -activebackground] 4
} -result {#012345}
test menu-2.37 {entry configuration options 0 -activebackground non-existent tearoff} -body {
.m1 entryconfigure 0 -activebackground non-existent
} -returnCodes error -result {unknown option "-activebackground"}
test menu-2.38 {entry configuration options 1 -activebackground non-existent command} -body {
.m1 entryconfigure 1 -activebackground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.39 {entry configuration options 2 -activebackground non-existent cascade} -body {
.m1 entryconfigure 2 -activebackground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.40 {entry configuration options 3 -activebackground non-existent separator} -body {
.m1 entryconfigure 3 -activebackground non-existent
} -returnCodes error -result {unknown option "-activebackground"}
test menu-2.41 {entry configuration options 4 -activebackground non-existent checkbutton} -body {
.m1 entryconfigure 4 -activebackground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.42 {entry configuration options 5 -activebackground non-existent radiobutton} -body {
.m1 entryconfigure 5 -activebackground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.43 {entry configuration options 0 -activeforeground #ff0000 tearoff} -body {
.m1 entryconfigure 0 -activeforeground #ff0000
} -returnCodes error -result {unknown option "-activeforeground"}
test menu-2.44 {entry configuration options 1 -activeforeground #ff0000 command} -body {
.m1 entryconfigure 1 -activeforeground #ff0000
lindex [.m1 entryconfigure 1 -activeforeground] 4
} -result {#ff0000}
test menu-2.45 {entry configuration options 2 -activeforeground #ff0000 cascade} -body {
.m1 entryconfigure 2 -activeforeground #ff0000
lindex [.m1 entryconfigure 2 -activeforeground] 4
} -result {#ff0000}
test menu-2.46 {entry configuration options 3 -activeforeground #ff0000 separator} -body {
.m1 entryconfigure 3 -activeforeground #ff0000
} -returnCodes error -result {unknown option "-activeforeground"}
test menu-2.47 {entry configuration options 4 -activeforeground #ff0000 checkbutton} -body {
.m1 entryconfigure 4 -activeforeground #ff0000
lindex [.m1 entryconfigure 4 -activeforeground] 4
} -result {#ff0000}
test menu-2.48 {entry configuration options 5 -activeforeground #ff0000 radiobutton} -body {
.m1 entryconfigure 5 -activeforeground #ff0000
lindex [.m1 entryconfigure 5 -activeforeground] 4
} -result {#ff0000}
test menu-2.49 {entry configuration options 0 -activeforeground non-existent tearoff} -body {
.m1 entryconfigure 0 -activeforeground non-existent
} -returnCodes error -result {unknown option "-activeforeground"}
test menu-2.50 {entry configuration options 1 -activeforeground non-existent command} -body {
.m1 entryconfigure 1 -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.51 {entry configuration options 2 -activeforeground non-existent cascade} -body {
.m1 entryconfigure 2 -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.52 {entry configuration options 3 -activeforeground non-existent separator} -body {
.m1 entryconfigure 3 -activeforeground non-existent
} -returnCodes error -result {unknown option "-activeforeground"}
test menu-2.53 {entry configuration options 4 -activeforeground non-existent checkbutton} -body {
.m1 entryconfigure 4 -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.54 {entry configuration options 5 -activeforeground non-existent radiobutton} -body {
.m1 entryconfigure 5 -activeforeground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.55 {entry configuration options 0 -accelerator Ctrl+S tearoff} -body {
.m1 entryconfigure 0 -accelerator Ctrl+S
} -returnCodes error -result {unknown option "-accelerator"}
test menu-2.56 {entry configuration options 1 -accelerator Ctrl+S command} -body {
.m1 entryconfigure 1 -accelerator Ctrl+S
lindex [.m1 entryconfigure 1 -accelerator] 4
} -result {Ctrl+S}
test menu-2.57 {entry configuration options 2 -accelerator Ctrl+S cascade} -body {
.m1 entryconfigure 2 -accelerator Ctrl+S
lindex [.m1 entryconfigure 2 -accelerator] 4
} -result {Ctrl+S}
test menu-2.58 {entry configuration options 3 -accelerator Ctrl+S separator} -body {
.m1 entryconfigure 3 -accelerator Ctrl+S
} -returnCodes error -result {unknown option "-accelerator"}
test menu-2.59 {entry configuration options 4 -accelerator Ctrl+S checkbutton} -body {
.m1 entryconfigure 4 -accelerator Ctrl+S
lindex [.m1 entryconfigure 4 -accelerator] 4
} -result {Ctrl+S}
test menu-2.60 {entry configuration options 5 -accelerator Ctrl+S radiobutton} -body {
.m1 entryconfigure 5 -accelerator Ctrl+S
lindex [.m1 entryconfigure 5 -accelerator] 4
} -result {Ctrl+S}
test menu-2.61 {entry configuration options 0 -background #ff0000 tearoff} -body {
.m1 entryconfigure 0 -background #ff0000
lindex [.m1 entryconfigure 0 -background] 4
} -result {#ff0000}
test menu-2.62 {entry configuration options 1 -background #ff0000 command} -body {
.m1 entryconfigure 1 -background #ff0000
lindex [.m1 entryconfigure 1 -background] 4
} -result {#ff0000}
test menu-2.63 {entry configuration options 2 -background #ff0000 cascade} -body {
.m1 entryconfigure 2 -background #ff0000
lindex [.m1 entryconfigure 2 -background] 4
} -result {#ff0000}
test menu-2.64 {entry configuration options 3 -background #ff0000 separator} -body {
.m1 entryconfigure 3 -background #ff0000
lindex [.m1 entryconfigure 3 -background] 4
} -result {#ff0000}
test menu-2.65 {entry configuration options 4 -background #ff0000 checkbutton} -body {
.m1 entryconfigure 4 -background #ff0000
lindex [.m1 entryconfigure 4 -background] 4
} -result {#ff0000}
test menu-2.66 {entry configuration options 5 -background #ff0000 radiobutton} -body {
.m1 entryconfigure 5 -background #ff0000
lindex [.m1 entryconfigure 5 -background] 4
} -result {#ff0000}
test menu-2.67 {entry configuration options 0 -background non-existent tearoff} -body {
.m1 entryconfigure 0 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.68 {entry configuration options 1 -background non-existent command} -body {
.m1 entryconfigure 1 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.69 {entry configuration options 2 -background non-existent cascade} -body {
.m1 entryconfigure 2 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.70 {entry configuration options 3 -background non-existent separator} -body {
.m1 entryconfigure 3 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.71 {entry configuration options 4 -background non-existent checkbutton} -body {
.m1 entryconfigure 4 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.72 {entry configuration options 5 -background non-existent radiobutton} -body {
.m1 entryconfigure 5 -background non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.73 {entry configuration options 0 -bitmap questhead tearoff} -body {
.m1 entryconfigure 0 -bitmap questhead
} -returnCodes error -result {unknown option "-bitmap"}
test menu-2.74 {entry configuration options 1 -bitmap questhead command} -body {
.m1 entryconfigure 1 -bitmap questhead
lindex [.m1 entryconfigure 1 -bitmap] 4
} -result {questhead}
test menu-2.75 {entry configuration options 2 -bitmap questhead cascade} -body {
.m1 entryconfigure 2 -bitmap questhead
lindex [.m1 entryconfigure 2 -bitmap] 4
} -result {questhead}
test menu-2.76 {entry configuration options 3 -bitmap questhead separator} -body {
.m1 entryconfigure 3 -bitmap questhead
} -returnCodes error -result {unknown option "-bitmap"}
test menu-2.77 {entry configuration options 4 -bitmap questhead checkbutton} -body {
.m1 entryconfigure 4 -bitmap questhead
lindex [.m1 entryconfigure 4 -bitmap] 4
} -result {questhead}
test menu-2.78 {entry configuration options 5 -bitmap questhead radiobutton} -body {
.m1 entryconfigure 5 -bitmap questhead
lindex [.m1 entryconfigure 5 -bitmap] 4
} -result {questhead}
test menu-2.79 {entry configuration options 0 -bitmap badValue tearoff} -body {
.m1 entryconfigure 0 -bitmap badValue
} -returnCodes error -result {unknown option "-bitmap"}
test menu-2.80 {entry configuration options 1 -bitmap badValue command} -body {
.m1 entryconfigure 1 -bitmap badValue
} -returnCodes error -result {bitmap "badValue" not defined}
test menu-2.81 {entry configuration options 2 -bitmap badValue cascade} -body {
.m1 entryconfigure 2 -bitmap badValue
} -returnCodes error -result {bitmap "badValue" not defined}
test menu-2.82 {entry configuration options 3 -bitmap badValue separator} -body {
.m1 entryconfigure 3 -bitmap badValue
} -returnCodes error -result {unknown option "-bitmap"}
test menu-2.83 {entry configuration options 4 -bitmap badValue checkbutton} -body {
.m1 entryconfigure 4 -bitmap badValue
} -returnCodes error -result {bitmap "badValue" not defined}
test menu-2.84 {entry configuration options 5 -bitmap badValue radiobutton} -body {
.m1 entryconfigure 5 -bitmap badValue
} -returnCodes error -result {bitmap "badValue" not defined}
test menu-2.85 {entry configuration options 0 -columnbreak 1 tearoff} -body {
.m1 entryconfigure 0 -columnbreak 1
} -returnCodes error -result {unknown option "-columnbreak"}
test menu-2.86 {entry configuration options 1 -columnbreak 1 command} -body {
.m1 entryconfigure 1 -columnbreak 1
lindex [.m1 entryconfigure 1 -columnbreak] 4
} -result 1
test menu-2.87 {entry configuration options 2 -columnbreak 1 cascade} -body {
.m1 entryconfigure 2 -columnbreak 1
lindex [.m1 entryconfigure 2 -columnbreak] 4
} -result 1
test menu-2.88 {entry configuration options 3 -columnbreak 1 separator} -body {
.m1 entryconfigure 3 -columnbreak 1
} -returnCodes error -result {unknown option "-columnbreak"}
test menu-2.89 {entry configuration options 4 -columnbreak 1 checkbutton} -body {
.m1 entryconfigure 4 -columnbreak 1
lindex [.m1 entryconfigure 4 -columnbreak] 4
} -result 1
test menu-2.90 {entry configuration options 5 -columnbreak 1 radiobutton} -body {
.m1 entryconfigure 5 -columnbreak 1
lindex [.m1 entryconfigure 5 -columnbreak] 4
} -result 1
test menu-2.91 {entry configuration options 0 -command beep tearoff} -body {
.m1 entryconfigure 0 -command beep
} -returnCodes error -result {unknown option "-command"}
test menu-2.92 {entry configuration options 1 -command beep command} -body {
.m1 entryconfigure 1 -command beep
lindex [.m1 entryconfigure 1 -command] 4
} -result {beep}
test menu-2.93 {entry configuration options 2 -command beep cascade} -body {
.m1 entryconfigure 2 -command beep
lindex [.m1 entryconfigure 2 -command] 4
} -result {beep}
test menu-2.94 {entry configuration options 3 -command beep separator} -body {
.m1 entryconfigure 3 -command beep
} -returnCodes error -result {unknown option "-command"}
test menu-2.95 {entry configuration options 4 -command beep checkbutton} -body {
.m1 entryconfigure 4 -command beep
lindex [.m1 entryconfigure 4 -command] 4
} -result {beep}
test menu-2.96 {entry configuration options 5 -command beep radiobutton} -body {
.m1 entryconfigure 5 -command beep
lindex [.m1 entryconfigure 5 -command] 4
} -result {beep}
test menu-2.97 {entry configuration options 0 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* tearoff} -body {
.m1 entryconfigure 0 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
} -returnCodes error -result {unknown option "-font"}
test menu-2.98 {entry configuration options 1 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* command} -body {
.m1 entryconfigure 1 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
lindex [.m1 entryconfigure 1 -font] 4
} -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*}
test menu-2.99 {entry configuration options 2 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* cascade} -body {
.m1 entryconfigure 2 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
lindex [.m1 entryconfigure 2 -font] 4
} -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*}
test menu-2.100 {entry configuration options 3 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* separator} -body {
.m1 entryconfigure 3 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
} -returnCodes error -result {unknown option "-font"}
test menu-2.101 {entry configuration options 4 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* checkbutton} -body {
.m1 entryconfigure 4 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
lindex [.m1 entryconfigure 4 -font] 4
} -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*}
test menu-2.102 {entry configuration options 5 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* radiobutton} -body {
.m1 entryconfigure 5 -font -Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*
lindex [.m1 entryconfigure 5 -font] 4
} -result {-Adobe-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-*}
test menu-2.103 {entry configuration options 0 -font {kill rock stars} tearoff} -body {
.m1 entryconfigure 0 -font {kill rock stars}
} -returnCodes error -result {unknown option "-font"}
test menu-2.104 {entry configuration options 1 -font {kill rock stars} command} -body {
.m1 entryconfigure 1 -font {kill rock stars}
} -returnCodes error -result {expected integer but got "rock"}
test menu-2.105 {entry configuration options 2 -font {kill rock stars} cascade} -body {
.m1 entryconfigure 2 -font {kill rock stars}
} -returnCodes error -result {expected integer but got "rock"}
test menu-2.106 {entry configuration options 3 -font {kill rock stars} separator} -body {
.m1 entryconfigure 3 -font {kill rock stars}
} -returnCodes error -result {unknown option "-font"}
test menu-2.107 {entry configuration options 4 -font {kill rock stars} checkbutton} -body {
.m1 entryconfigure 4 -font {kill rock stars}
} -returnCodes error -result {expected integer but got "rock"}
test menu-2.108 {entry configuration options 5 -font {kill rock stars} radiobutton} -body {
.m1 entryconfigure 5 -font {kill rock stars}
} -returnCodes error -result {expected integer but got "rock"}
test menu-2.109 {entry configuration options 0 -foreground #110022 tearoff} -body {
.m1 entryconfigure 0 -foreground #110022
} -returnCodes error -result {unknown option "-foreground"}
test menu-2.110 {entry configuration options 1 -foreground #110022 command} -body {
.m1 entryconfigure 1 -foreground #110022
lindex [.m1 entryconfigure 1 -foreground] 4
} -result {#110022}
test menu-2.111 {entry configuration options 2 -foreground #110022 cascade} -body {
.m1 entryconfigure 2 -foreground #110022
lindex [.m1 entryconfigure 2 -foreground] 4
} -result {#110022}
test menu-2.112 {entry configuration options 3 -foreground #110022 separator} -body {
.m1 entryconfigure 3 -foreground #110022
} -returnCodes error -result {unknown option "-foreground"}
test menu-2.113 {entry configuration options 4 -foreground #110022 checkbutton} -body {
.m1 entryconfigure 4 -foreground #110022
lindex [.m1 entryconfigure 4 -foreground] 4
} -result {#110022}
test menu-2.114 {entry configuration options 5 -foreground #110022 radiobutton} -body {
.m1 entryconfigure 5 -foreground #110022
lindex [.m1 entryconfigure 5 -foreground] 4
} -result {#110022}
test menu-2.115 {entry configuration options 0 -foreground non-existent tearoff} -body {
.m1 entryconfigure 0 -foreground non-existent
} -returnCodes error -result {unknown option "-foreground"}
test menu-2.116 {entry configuration options 1 -foreground non-existent command} -body {
.m1 entryconfigure 1 -foreground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.117 {entry configuration options 2 -foreground non-existent cascade} -body {
.m1 entryconfigure 2 -foreground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.118 {entry configuration options 3 -foreground non-existent separator} -body {
.m1 entryconfigure 3 -foreground non-existent
} -returnCodes error -result {unknown option "-foreground"}
test menu-2.119 {entry configuration options 4 -foreground non-existent checkbutton} -body {
.m1 entryconfigure 4 -foreground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.120 {entry configuration options 5 -foreground non-existent radiobutton} -body {
.m1 entryconfigure 5 -foreground non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.121 {entry configuration options 0 -image image1 tearoff} -body {
.m1 entryconfigure 0 -image image1
} -returnCodes error -result {unknown option "-image"}
test menu-2.122 {entry configuration options 1 -image image1 command} -setup {
.m1 entryconfigure 1 -image {}
} -body {
.m1 entryconfigure 1 -image image1
lindex [.m1 entryconfigure 1 -image] 4
} -cleanup {
.m1 entryconfigure 1 -image {}
} -result {image1}
test menu-2.123 {entry configuration options 2 -image image1 cascade} -setup {
.m1 entryconfigure 2 -image {}
} -body {
.m1 entryconfigure 2 -image image1
lindex [.m1 entryconfigure 2 -image] 4
} -cleanup {
.m1 entryconfigure 2 -image {}
} -result {image1}
test menu-2.124 {entry configuration options 3 -image image1 separator} -body {
.m1 entryconfigure 3 -image image1
} -returnCodes error -result {unknown option "-image"}
test menu-2.125 {entry configuration options 4 -image image1 checkbutton} -setup {
.m1 entryconfigure 4 -image {}
} -body {
.m1 entryconfigure 4 -image image1
lindex [.m1 entryconfigure 4 -image] 4
} -cleanup {
.m1 entryconfigure 4 -image {}
} -result {image1}
test menu-2.126 {entry configuration options 5 -image image1 radiobutton} -setup {
.m1 entryconfigure 5 -image {}
} -body {
.m1 entryconfigure 5 -image image1
lindex [.m1 entryconfigure 5 -image] 4
} -cleanup {
.m1 entryconfigure 5 -image {}
} -result {image1}
test menu-2.127 {entry configuration options 0 -image bogus tearoff} -body {
.m1 entryconfigure 0 -image bogus
} -returnCodes error -result {unknown option "-image"}
test menu-2.128 {entry configuration options 1 -image bogus command} -body {
.m1 entryconfigure 1 -image bogus
} -returnCodes error -result {image "bogus" does not exist}
test menu-2.129 {entry configuration options 2 -image bogus cascade} -body {
.m1 entryconfigure 2 -image bogus
} -returnCodes error -result {image "bogus" does not exist}
test menu-2.130 {entry configuration options 3 -image bogus separator} -body {
.m1 entryconfigure 3 -image bogus
} -returnCodes error -result {unknown option "-image"}
test menu-2.131 {entry configuration options 4 -image bogus checkbutton} -body {
.m1 entryconfigure 4 -image bogus
} -returnCodes error -result {image "bogus" does not exist}
test menu-2.132 {entry configuration options 5 -image bogus radiobutton} -body {
.m1 entryconfigure 5 -image bogus
} -returnCodes error -result {image "bogus" does not exist}
test menu-2.133 {entry configuration options 0 -image {} tearoff} -body {
.m1 entryconfigure 0 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.134 {entry configuration options 1 -image {} command} -setup {
.m1 entryconfigure 1 -image {}
} -body {
.m1 entryconfigure 1 -image
lindex [.m1 entryconfigure 1 -image] 4
} -result {}
test menu-2.135 {entry configuration options 2 -image {} cascade} -setup {
.m1 entryconfigure 2 -image {}
} -body {
.m1 entryconfigure 2 -image
lindex [.m1 entryconfigure 2 -image] 4
} -result {}
test menu-2.136 {entry configuration options 3 -image {} separator} -body {
.m1 entryconfigure 3 -image
} -returnCodes error -result {unknown option "-image"}
test menu-2.137 {entry configuration options 4 -image {} checkbutton} -body {
.m1 entryconfigure 4 -image
lindex [.m1 entryconfigure 4 -image] 4
} -result {}
test menu-2.138 {entry configuration options 5 -image {} radiobutton} -body {
.m1 entryconfigure 5 -image
lindex [.m1 entryconfigure 5 -image] 4
} -result {}
test menu-2.139 {entry configuration options 0 -indicatoron 1 tearoff} -body {
.m1 entryconfigure 0 -indicatoron 1
} -returnCodes error -result {unknown option "-indicatoron"}
test menu-2.140 {entry configuration options 1 -indicatoron 1 command} -body {
.m1 entryconfigure 1 -indicatoron 1
} -returnCodes error -result {unknown option "-indicatoron"}
test menu-2.141 {entry configuration options 2 -indicatoron 1 cascade} -body {
.m1 entryconfigure 2 -indicatoron 1
} -returnCodes error -result {unknown option "-indicatoron"}
test menu-2.142 {entry configuration options 3 -indicatoron 1 separator} -body {
.m1 entryconfigure 3 -indicatoron 1
} -returnCodes error -result {unknown option "-indicatoron"}
test menu-2.143 {entry configuration options 4 -indicatoron 1 checkbutton} -body {
.m1 entryconfigure 4 -indicatoron 1
lindex [.m1 entryconfigure 4 -indicatoron] 4
} -result 1
test menu-2.144 {entry configuration options 5 -indicatoron 1 radiobutton} -body {
.m1 entryconfigure 5 -indicatoron 1
lindex [.m1 entryconfigure 5 -indicatoron] 4
} -result 1
test menu-2.145 {entry configuration options 0 -label test tearoff} -body {
.m1 entryconfigure 0 -label test
} -returnCodes error -result {unknown option "-label"}
test menu-2.146 {entry configuration options 1 -label test command} -body {
.m1 entryconfigure 1 -label test
lindex [.m1 entryconfigure 1 -label] 4
} -result {test}
test menu-2.147 {entry configuration options 2 -label test cascade} -body {
.m1 entryconfigure 2 -label test
lindex [.m1 entryconfigure 2 -label] 4
} -result {test}
test menu-2.148 {entry configuration options 3 -label test separator} -body {
.m1 entryconfigure 3 -label test
} -returnCodes error -result {unknown option "-label"}
test menu-2.149 {entry configuration options 4 -label test checkbutton} -body {
.m1 entryconfigure 4 -label test
lindex [.m1 entryconfigure 4 -label] 4
} -result {test}
test menu-2.150 {entry configuration options 5 -label test radiobutton} -body {
.m1 entryconfigure 5 -label test
lindex [.m1 entryconfigure 5 -label] 4
} -result {test}
test menu-2.151 {entry configuration options 0 -menu .m2 tearoff} -body {
.m1 entryconfigure 0 -menu .m2
} -returnCodes error -result {unknown option "-menu"}
test menu-2.152 {entry configuration options 1 -menu .m2 command} -body {
.m1 entryconfigure 1 -menu .m2
} -returnCodes error -result {unknown option "-menu"}
test menu-2.153 {entry configuration options 2 -menu .m2 cascade} -body {
.m1 entryconfigure 2 -menu .m2
lindex [.m1 entryconfigure 2 -menu] 4
} -result {.m2}
test menu-2.154 {entry configuration options 3 -menu .m2 separator} -body {
.m1 entryconfigure 3 -menu .m2
} -returnCodes error -result {unknown option "-menu"}
test menu-2.155 {entry configuration options 4 -menu .m2 checkbutton} -body {
.m1 entryconfigure 4 -menu .m2
} -returnCodes error -result {unknown option "-menu"}
test menu-2.156 {entry configuration options 5 -menu .m2 radiobutton} -body {
.m1 entryconfigure 5 -menu .m2
} -returnCodes error -result {unknown option "-menu"}
test menu-2.157 {entry configuration options 0 -offvalue off tearoff} -body {
.m1 entryconfigure 0 -offvalue off
} -returnCodes error -result {unknown option "-offvalue"}
test menu-2.158 {entry configuration options 1 -offvalue off command} -body {
.m1 entryconfigure 1 -offvalue off
} -returnCodes error -result {unknown option "-offvalue"}
test menu-2.159 {entry configuration options 2 -offvalue off cascade} -body {
.m1 entryconfigure 2 -offvalue off
} -returnCodes error -result {unknown option "-offvalue"}
test menu-2.160 {entry configuration options 3 -offvalue off separator} -body {
.m1 entryconfigure 3 -offvalue off
} -returnCodes error -result {unknown option "-offvalue"}
test menu-2.161 {entry configuration options 4 -offvalue off checkbutton} -body {
.m1 entryconfigure 4 -offvalue off
lindex [.m1 entryconfigure 4 -offvalue] 4
} -result {off}
test menu-2.162 {entry configuration options 5 -offvalue off radiobutton} -body {
.m1 entryconfigure 5 -offvalue off
} -returnCodes error -result {unknown option "-offvalue"}
test menu-2.163 {entry configuration options 0 -onvalue on tearoff} -body {
.m1 entryconfigure 0 -onvalue on
} -returnCodes error -result {unknown option "-onvalue"}
test menu-2.164 {entry configuration options 1 -onvalue on command} -body {
.m1 entryconfigure 1 -onvalue on
} -returnCodes error -result {unknown option "-onvalue"}
test menu-2.165 {entry configuration options 2 -onvalue on cascade} -body {
.m1 entryconfigure 2 -onvalue on
} -returnCodes error -result {unknown option "-onvalue"}
test menu-2.166 {entry configuration options 3 -onvalue on separator} -body {
.m1 entryconfigure 3 -onvalue on
} -returnCodes error -result {unknown option "-onvalue"}
test menu-2.167 {entry configuration options 4 -onvalue on checkbutton} -body {
.m1 entryconfigure 4 -onvalue on
lindex [.m1 entryconfigure 4 -onvalue] 4
} -result {on}
test menu-2.168 {entry configuration options 5 -onvalue on radiobutton} -body {
.m1 entryconfigure 5 -onvalue on
} -returnCodes error -result {unknown option "-onvalue"}
test menu-2.169 {entry configuration options 0 -selectcolor #110022 tearoff} -body {
.m1 entryconfigure 0 -selectcolor #110022
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.170 {entry configuration options 1 -selectcolor #110022 command} -body {
.m1 entryconfigure 1 -selectcolor #110022
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.171 {entry configuration options 2 -selectcolor #110022 cascade} -body {
.m1 entryconfigure 2 -selectcolor #110022
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.172 {entry configuration options 3 -selectcolor #110022 separator} -body {
.m1 entryconfigure 3 -selectcolor #110022
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.173 {entry configuration options 4 -selectcolor #110022 checkbutton} -body {
.m1 entryconfigure 4 -selectcolor #110022
lindex [.m1 entryconfigure 4 -selectcolor] 4
} -result {#110022}
test menu-2.174 {entry configuration options 5 -selectcolor #110022 radiobutton} -body {
.m1 entryconfigure 5 -selectcolor #110022
lindex [.m1 entryconfigure 5 -selectcolor] 4
} -result {#110022}
test menu-2.175 {entry configuration options 0 -selectcolor non-existent tearoff} -body {
.m1 entryconfigure 0 -selectcolor non-existent
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.176 {entry configuration options 1 -selectcolor non-existent command} -body {
.m1 entryconfigure 1 -selectcolor non-existent
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.177 {entry configuration options 2 -selectcolor non-existent cascade} -body {
.m1 entryconfigure 2 -selectcolor non-existent
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.178 {entry configuration options 3 -selectcolor non-existent separator} -body {
.m1 entryconfigure 3 -selectcolor non-existent
} -returnCodes error -result {unknown option "-selectcolor"}
test menu-2.179 {entry configuration options 4 -selectcolor non-existent checkbutton} -body {
.m1 entryconfigure 4 -selectcolor non-existent
} -returnCodes error -result {unknown color name "non-existent"}
test menu-2.180 {entry configuration options 5 -selectcolor non-existent radiobutton} -body {