Tk Source Code

Check-in [bf7ebc07]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Constrain tests that improperly demand user interaction.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-5-branch
Files: files | file ages | folders
SHA1: bf7ebc074f3629dad29ec6e248cc3a431774fc60
User & Date: dgp 2012-11-09 13:29:08
Context
2012-11-09
13:38
Avoid setting TK_LIBRARY to a relative pathname. check-in: b685add0 user: dgp tags: core-8-5-branch
13:36
Constrain tests presumed to improperly demand user interaction. check-in: a8478166 user: dgp tags: trunk
13:29
Constrain tests that improperly demand user interaction. check-in: bf7ebc07 user: dgp tags: core-8-5-branch
2012-11-07
14:22
[Bug 3574708]: Move window liveness checks to better location. check-in: 637c1712 user: dkf tags: core-8-5-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/winDialog.test.

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
    then {
	Click cancel
    }
} {0}
test winDialog-5.7 {GetFileName: valid option, but missing value} {nt} {
    list [catch {tk_getOpenFile -initialdir bar -title} msg] $msg
} {1 {value for "-title" missing}}
test winDialog-5.8 {GetFileName: extension begins with .} {nt testwinevent} {
#    if (string[0] == '.') {
#	string++;
#    }

    start {set x [tk_getSaveFile -defaultextension .foo -title Save]}
    then {
	SetText 0x480 bar
	Click ok
    }
    string totitle $x
} [string totitle [file join [pwd] bar.foo]]
test winDialog-5.9 {GetFileName: extension doesn't begin with .} {nt testwinevent} {
    start {set x [tk_getSaveFile -defaultextension foo -title Save]}
    then {
	SetText 0x480 bar
	Click ok
    }
    string totitle $x
} [string totitle [file join [pwd] bar.foo]]







|











|







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
    then {
	Click cancel
    }
} {0}
test winDialog-5.7 {GetFileName: valid option, but missing value} {nt} {
    list [catch {tk_getOpenFile -initialdir bar -title} msg] $msg
} {1 {value for "-title" missing}}
test winDialog-5.8 {GetFileName: extension begins with .} {nt testwinevent knownBug} {
#    if (string[0] == '.') {
#	string++;
#    }

    start {set x [tk_getSaveFile -defaultextension .foo -title Save]}
    then {
	SetText 0x480 bar
	Click ok
    }
    string totitle $x
} [string totitle [file join [pwd] bar.foo]]
test winDialog-5.9 {GetFileName: extension doesn't begin with .} {nt testwinevent knownBug} {
    start {set x [tk_getSaveFile -defaultextension foo -title Save]}
    then {
	SetText 0x480 bar
	Click ok
    }
    string totitle $x
} [string totitle [file join [pwd] bar.foo]]
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
    then {
	set x [GetText ok]
	Click cancel
    }
    set x
} {&Save}
if {[info exists ::env(TEMP)]} {
test winDialog-5.24 {GetFileName: convert \ to /} {nt testwinevent} {
    start {set x [tk_getSaveFile -title Back]}
    then {
	SetText 0x480 [file nativename \
                           [file join [file normalize $::env(TEMP)] "12x 457"]]
	Click ok
    }
    set x







|







338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
    then {
	set x [GetText ok]
	Click cancel
    }
    set x
} {&Save}
if {[info exists ::env(TEMP)]} {
test winDialog-5.24 {GetFileName: convert \ to /} {nt testwinevent knownBug} {
    start {set x [tk_getSaveFile -title Back]}
    then {
	SetText 0x480 [file nativename \
                           [file join [file normalize $::env(TEMP)] "12x 457"]]
	Click ok
    }
    set x