summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-05-25 18:46:52 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-05-25 18:46:52 (GMT)
commit7b34c540ec190b661e37418ef31a01ce24492fdb (patch)
tree638225d1c8207a64a77c6ca3b5a0cdc89047cb84
parentec2312f54a9b7174ec63edea2d8966183bbe1b76 (diff)
downloadtcl-7b34c540ec190b661e37418ef31a01ce24492fdb.zip
tcl-7b34c540ec190b661e37418ef31a01ce24492fdb.tar.gz
tcl-7b34c540ec190b661e37418ef31a01ce24492fdb.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.test21
2 files changed, 13 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 4834bc4..c6d9a30 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-25 Don Porter <dgp@users.sourceforge.net>
* tests/http.test: Clear away the custom [bgerror] when done.
diff --git a/tests/winFCmd.test b/tests/winFCmd.test
index 5da5dd4..2ff1fee 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.28 2004/05/19 20:15:32 dkf Exp $
+# RCS: @(#) $Id: winFCmd.test,v 1.29 2004/05/25 18:46:53 kennykb Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -61,20 +61,11 @@ if {[string equal $tcl_platform(platform) "windows"]} {
# 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"} {
- set cdrom ${p}:
- }
- if {$err == "ENOENT"} {
- set nodrive ${p}:
- }
- } else {
- close $fd
- file delete $name
+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}:
+ }
}
}