From f2dcc1b2ec530a1c7946ced2631319910626d11f Mon Sep 17 00:00:00 2001 From: "dgp@users.sourceforge.net" Date: Thu, 13 Jun 2002 15:31:38 +0000 Subject: * tests/cursor.test: corrected error after cursor-2.2. * tests/defs.tcl: Added enhancements to Tk's fake version of tcltest required by recent cursor.test changes. --- ChangeLog | 6 ++++++ tests/cursor.test | 4 ++-- tests/defs.tcl | 8 ++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98a263c..1cb1153 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-13 Don Porter + + * tests/cursor.test: corrected error after cursor-2.2. + * tests/defs.tcl: Added enhancements to Tk's fake version of + tcltest required by recent cursor.test changes. + 2002-06-13 Donal K. Fellows * tests/cursor.test (cursor-2.[34]): Tests added to ensure that diff --git a/tests/cursor.test b/tests/cursor.test index 35a1d84..11e23aa 100644 --- a/tests/cursor.test +++ b/tests/cursor.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: cursor.test,v 1.4 2002/06/13 09:46:39 dkf Exp $ +# RCS: @(#) $Id: cursor.test,v 1.5 2002/06/13 15:31:39 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -85,7 +85,7 @@ foreach wincur(num) $wincur(data_octal) { append wincur(data_binary) [binary format c 0$wincur(num)] } set wincur(dir) [::tcltest::makeDirectory {dir with spaces}] -set wincur(file) [::tcltest::makeFile $curdata "test file.cur" $wincur(dir)] +set wincur(file) [::tcltest::makeFile $wincur(data_binary) "test file.cur" $wincur(dir)] test cursor-2.3 {Tk_GetCursor procedure: cursor specs are lists} {pcOnly} { destroy .b1 button .b1 -cursor [list @$wincur(file)] diff --git a/tests/defs.tcl b/tests/defs.tcl index 3c79557..e16a136 100644 --- a/tests/defs.tcl +++ b/tests/defs.tcl @@ -11,7 +11,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: defs.tcl,v 1.8 2001/10/19 17:43:35 hobbs Exp $ +# RCS: @(#) $Id: defs.tcl,v 1.9 2002/06/13 15:31:39 dgp Exp $ # Initialize wish shell @@ -784,7 +784,10 @@ proc ::tcltest::normalizeMsg {msg} { # cleanupTests was called, add it to the $filesMade list, so it will # be removed by the next call to cleanupTests. # -proc ::tcltest::makeFile {contents name} { +proc ::tcltest::makeFile {contents name {directory {}}} { + if {[string length $directory]} { + set name [file join $directory $name] + } set fd [open $name w] fconfigure $fd -translation lf if {[string index $contents [expr {[string length $contents] - 1}]] == "\n"} { @@ -819,6 +822,7 @@ proc ::tcltest::makeDirectory {name} { if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} { lappend ::tcltest::filesMade $fullName } + return $fullName } proc ::tcltest::removeDirectory {name} { -- cgit v0.12