summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-05-25 19:02:23 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-05-25 19:02:23 (GMT)
commitf54b39a2a3db59321f0fef9bed7f1606156deb1a (patch)
tree7a317582b8d3131d866c9bf1adfac0cb22be5d54
parent2178c51e4f47a6c6e161dc11518bfa588422d69c (diff)
downloadtcl-f54b39a2a3db59321f0fef9bed7f1606156deb1a.zip
tcl-f54b39a2a3db59321f0fef9bed7f1606156deb1a.tar.gz
tcl-f54b39a2a3db59321f0fef9bed7f1606156deb1a.tar.bz2
* tests/winFCmd.test: Correct test for the presence of a CD-ROM so
that it doesn't misdetect some other sort of filesystem with a write-protected root as being a CD-ROM drive. [Bug 918267]
-rw-r--r--ChangeLog7
-rw-r--r--tests/winFCmd.test17
2 files changed, 11 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 9ec3292..4c6a816 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-05-25 Kevin Kenny <kennykb@acm.org>
+
+ * tests/winFCmd.test: Correct test for the presence of a CD-ROM so
+ that it doesn't misdetect some other sort
+ of filesystem with a write-protected root as
+ being a CD-ROM drive. [Bug 918267]
+
2004-05-24 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclExecute.c (VerifyExprObjType): use GET_WIDE_OR_INT to
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 0b1fdf0..a8a05c4 100644
--- a/tests/winFCmd.test
+++ b/tests/winFCmd.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: winFCmd.test,v 1.20.2.4 2004/05/04 22:26:00 hobbs Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.20.2.5 2004/05/25 19:02:28 kennykb Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -64,20 +64,11 @@ set ::tcltest::testConstraints(exdev) 0
# find a CD-ROM so we can test read-only filesystems.
set cdrom {}
-set nodrive x:
-foreach p {d e f g h i j k l m n o p q r s t u v w x y z} {
- set name ${p}:/dummy~~.fil
- if [catch {set fd [open $name w]}] {
- set err [lindex $errorCode 1]
- if {$cdrom == "" && $err == "EACCES"} {
+if { [info commands ::testvolumetype] ne {} } {
+ foreach p {d e f g h i j k l m n o p q r s t u v w x y z} {
+ if { ! [catch { testvolumetype ${p}: } result] && $result eq {CDFS} } {
set cdrom ${p}:
}
- if {$err == "ENOENT"} {
- set nodrive ${p}:
- }
- } else {
- close $fd
- file delete $name
}
}