From 604a950260e29f0248794d40eb88e73a7cfc1465 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Fri, 14 Dec 2007 13:52:55 +0000 Subject: Fix for broken test on win2k with long machine name --- ChangeLog | 6 +++++- tests/winFile.test | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0568a20..2608749 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,11 @@ +2007-12-14 Pat Thoyts + + * tests/winFile.test: Fixed tests for win2k with long machine name + 2007-12-14 Pat Thoyts * win/nmakehlp.c: Support compilation with MSVC9 for AMD64. - * win/makefile.vc: + * win/makefile.vc: 2007-12-13 Donal K. Fellows diff --git a/tests/winFile.test b/tests/winFile.test index c08cc20..0cefcb5 100644 --- a/tests/winFile.test +++ b/tests/winFile.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: winFile.test,v 1.19 2006/10/01 09:51:05 patthoyts Exp $ +# RCS: @(#) $Id: winFile.test,v 1.20 2007/12/14 13:52:55 patthoyts Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -95,6 +95,9 @@ proc cacls {fname args} { # dir/q output: # 2003-11-03 20:36 598 OCTAVIAN\benny filename.txt +# Note this output from a german win2k machine: +# 14.12.2007 14:26 30 VORDEFINIERT\Administratest.dat +# # Modified to cope with Msys environment and use ls -l. proc getuser {fname} { global env @@ -112,7 +115,7 @@ proc getuser {fname} { } else { set dirtext [exec cmd /c dir /q [file nativename $fname]] foreach line [split $dirtext "\n"] { - if {[string match -nocase "* $tail" $line]} { + if {[string match -nocase "*$tail" $line]} { set attrs [string range $line \ 0 end-[string length $tail]] regexp { [^ \\]+\\.*$} $attrs owner -- cgit v0.12