diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/entry.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/entry.test b/tests/entry.test index fbaf6a5..aa2b9fd 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -627,6 +627,23 @@ test entry-1.58 {configuration option: "xscrollcommand" for entry} -setup { destroy .e } -result {Some command} +test entry-1.59 {configuration option: "emptytext"} -setup { + pack [entry .e] +} -body { + .e configure -emptytext {Some text} + .e cget -emptytext +} -cleanup { + destroy .e +} -result {Some text} + +test entry-1.60 {configuration option: "emptyforeground"} -setup { + pack [entry .e] +} -body { + .e configure -emptytext {Some text} -emptyforeground red + .e cget -emptyforeground +} -cleanup { + destroy .e +} -result {red} test entry-2.1 {Tk_EntryCmd procedure} -body { @@ -3502,6 +3519,22 @@ test entry-24.1 {textvariable lives in a non-existing namespace} -setup { destroy .e } -result {can't trace "thisnsdoesntexist::myvar": parent namespace doesn't exist} +test entry-25.1 {emptytext on/off shown} -setup { + pack [entry .e] +} -body { + .e configure -emptytext {empty} -textvariable ::_e + update; after 1000 + set ::_e entry + update; after 1000 + set ::_e {} + update; after 1000 + set ::_e entry + update; after 1000 +} -cleanup { + destroy .e + unset ::_e +} -result {} + # Gathered comments about lacks # XXX Still need to write tests for EntryBlinkProc, EntryFocusProc, # and EntryTextVarProc. |