summaryrefslogtreecommitdiffstats
path: root/tests/ttk/misc.test
blob: 27b87d6c5f3c09e06eb182cf38ab1ce0e7da8f11 (plain)
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
#
# $Id: misc.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
#

package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands

test misc-1.0 "#1551500 -parent option in ttk::dialog doesn't work" -body {
    ttk::dialog .dialog -parent . -type ok \
	-message "Something to say" -title "Let's see"
    wm transient .dialog
} -result . -cleanup { destroy .dialog }

test misc-1.1 "ttk::dialog w/no -parent option" -body {
    toplevel .t
    ttk::dialog .t.dialog -type ok
    wm transient .t.dialog
} -result .t -cleanup { destroy .t }

test misc-1.2 "Explicitly specify -parent" -body {
    toplevel .t
    ttk::dialog .t.dialog -type ok -parent .
    wm transient .t.dialog
} -result . -cleanup { destroy .t }

test misc-1.3 "Nontransient dialog" -body {
    toplevel .t
    ttk::dialog .t.dialog -type ok -parent ""
    wm transient .t.dialog
} -result "" -cleanup { destroy .t }

tcltest::cleanupTests