os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/winFile.test
Update contrib.
1 # This file tests the tclWinFile.c file.
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1997 Sun Microsystems, Inc.
8 # Copyright (c) 1998-1999 by Scriptics Corporation.
10 # See the file "license.terms" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # RCS: @(#) $Id: winFile.test,v 1.9.2.1 2003/04/14 15:45:58 vincentdarley Exp $
15 if {[lsearch [namespace children] ::tcltest] == -1} {
16 package require tcltest
17 namespace import -force ::tcltest::*
20 test winFile-1.1 {TclpGetUserHome} {pcOnly} {
21 list [catch {glob ~nosuchuser} msg] $msg
22 } {1 {user "nosuchuser" doesn't exist}}
23 test winFile-1.2 {TclpGetUserHome} {pcOnly nt nonPortable} {
24 # The administrator account should always exist.
26 catch {glob ~administrator}
28 test winFile-1.3 {TclpGetUserHome} {pcOnly 95} {
29 # Find some user in system.ini and then see if they have a home.
31 set f [open $::env(windir)/system.ini]
35 if {$line == "\[Password Lists]"} {
37 set name [lindex [split [gets $f] =] 0]
39 set x [catch {glob ~$name}]
47 test winFile-1.4 {TclpGetUserHome} {pcOnly nt nonPortable} {
48 catch {glob ~stanton@workgroup}
51 test winFile-2.1 {TclpMatchFiles: case sensitivity} {pcOnly} {
53 set result [list [glob -nocomplain GlobC*] [glob -nocomplain globc*]]
58 test winFile-2.2 {TclpMatchFiles: case sensitivity} {pcOnly} {
60 set result [list [glob -nocomplain globl*] [glob -nocomplain gLOBl*]]
63 } {globlower globlower}
65 test winFile-3.1 {file system} {pcOnly} {
66 set res "volume types ok"
67 foreach vol [file volumes] {
68 # Have to catch in case there is a removable drive (CDROM, floppy)
71 if {![string equal [lindex [file system $vol] 1] [testvolumetype $vol]]} {
72 set res "For $vol, we found [file system $vol]\
73 and [testvolumetype $vol] are different"
82 ::tcltest::cleanupTests