diff options
author | fvogel <fvogelnew1@free.fr> | 2023-05-28 17:43:29 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-05-28 17:43:29 (GMT) |
commit | 4f7885d3768a84582efcd239f221a0ebedd70435 (patch) | |
tree | 1214c38b45eea6d2dda53102d51d8b58f9f1f80b /tests/menu.test | |
parent | ebde33e8f80909ca0b1d84a03041dee8ff2407a7 (diff) | |
download | tk-4f7885d3768a84582efcd239f221a0ebedd70435.zip tk-4f7885d3768a84582efcd239f221a0ebedd70435.tar.gz tk-4f7885d3768a84582efcd239f221a0ebedd70435.tar.bz2 |
Add (currently failing) tests demonstrating bug [a418aafa76]: Bogus @x,y indices are accepted for menu entries
Diffstat (limited to 'tests/menu.test')
-rw-r--r-- | tests/menu.test | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/tests/menu.test b/tests/menu.test index 152d2f4..f206a9e 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -3471,8 +3471,52 @@ test menu-22.5 {GetIndexFromCoords: mapped wide window} -setup { } -cleanup { deleteWindows } -result 0 +test menu-22.6 {GetIndexFromCoords: syntax error in @x,y indices} -setup { + deleteWindows +} -body { + menu .m + .m add command -label "First entry" + .m add command -label "Second entry" + .m add command -label "Last entry" + .m index @4bogus +} -cleanup { + deleteWindows +} -returnCodes error -result {bad menu entry index "@4bogus"} +test menu-22.7 {GetIndexFromCoords: syntax error in @x,y indices} -setup { + deleteWindows +} -body { + menu .m + .m add command -label "First entry" + .m add command -label "Second entry" + .m add command -label "Last entry" + .m index @10,4bogus +} -cleanup { + deleteWindows +} -returnCodes error -result {bad menu entry index "@10,4bogus"} +test menu-22.8 {GetIndexFromCoords: syntax error in @x,y indices} -setup { + deleteWindows +} -body { + menu .m + .m add command -label "First entry" + .m add command -label "Second entry" + .m add command -label "Last entry" + .m index @10,bogus +} -cleanup { + deleteWindows +} -returnCodes error -result {bad menu entry index "@10,bogus"} +test menu-22.9 {GetIndexFromCoords: index type pecedence} -setup { + deleteWindows +} -body { + menu .m -tearoff 0 + .m add command -label "First entry" + .m add command -label "@42nd street" + .m add command -label "Last entry" + .m index "@42nd*" ; # shall be interpreted as a pattern, not as @42 +} -cleanup { + deleteWindows +} -result {1} -test menu-22.6 {tk_popup on separator entry} -setup { +test menu-22.10 {tk_popup on separator entry} -setup { deleteWindows } -constraints {x11} -body { menu .m1 |