#
# cursorctext.test --
#   Unit tests for the cursor package over a ctext mega-widget.
#
#   Copyright: Michael Baudin, 2008, michael.baudin@gmail.com
#
package require tcltest
tcltest::configure -verbose {body pass skip start error}
package require ctext
package require cursor 

tcltest::test cursorctext-1 {basic usage} {
    set mytext [ctext .mytext]
    set result {}
    lappend result [.mytext cget -cursor]
    ::cursor::propagate . watch
    lappend result [.mytext cget -cursor]
    ::cursor::restore .
    lappend result [.mytext cget -cursor]
    destroy $mytext
    set result $result
    # Result is : xterm watch watch
} {xterm watch xterm}
tcltest::test cursorctext-2 {basic usage} {
    set mytext [ctext .mytext]
    set result {}
    lappend result [.mytext cget -cursor]
    ::cursor::propagate . watch
    lappend result [.mytext cget -cursor]
    ::cursor::restore . -depthfirst 1
    lappend result [.mytext cget -cursor]
    destroy $mytext
    set result $result
    # Result is : xterm watch watch
} {xterm watch xterm}
::tcltest::cleanupTests

