From e1ce868ec996a1d61b6468328b8c850a311ff512 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Mon, 6 Oct 2008 22:09:16 +0000 Subject: Fixed tests for Vista (cannot write to C:\) --- ChangeLog | 1 + tests/winDialog.test | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c58df8..5c6ed2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2008-10-06 Pat Thoyts + * tests/winDialog.test: Fixed tests for Vista+ * win/tkWinWm.c: corrected some errors from the previous commit 2008-10-05 Donal K. Fellows diff --git a/tests/winDialog.test b/tests/winDialog.test index c2c7b35..c9e06a3 100644 --- a/tests/winDialog.test +++ b/tests/winDialog.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # Copyright (c) 1998-1999 ActiveState Corporation. # -# RCS: @(#) $Id: winDialog.test,v 1.18 2008/08/30 21:52:26 aniap Exp $ +# RCS: @(#) $Id: winDialog.test,v 1.19 2008/10/06 22:09:16 patthoyts Exp $ package require tcltest 2.2 namespace import ::tcltest::* @@ -260,12 +260,14 @@ test winDialog-5.11 {GetFileName: initial directory} -constraints { } -body { # case FILE_INITDIR: - start {set x [tk_getSaveFile -initialdir c:/ -initialfile "12x 455" -title Foo]} + start {set x [tk_getSaveFile \ + -initialdir [file normalize $::env(TEMP)] \ + -initialfile "12x 455" -title Foo]} then { Click 1 } return $x -} -result {C:/12x 455} +} -result [file join [file normalize $::env(TEMP)] "12x 455"] test winDialog-5.12 {GetFileName: initial directory: Tcl_TranslateFilename()} -constraints { nt } -body { @@ -392,11 +394,11 @@ test winDialog-5.23 {GetFileName: convert \ to /} -constraints { } -body { start {set x [tk_getSaveFile -title Back]} then { - SetText 0x480 "c:\\12x 457" + SetText 0x480 "$::env(TEMP)\\12x 457" Click 1 } return $x -} -result {c:/12x 457} +} -result [file join [file normalize $::env(TEMP)] "12x 457"] test winDialog-5.24 {GetFileName: file types: MakeFilter() succeeds} -constraints { nt } -body { -- cgit v0.12