1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# This file tests the filename manipulation routines.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: fileName.test,v 1.51.8.1 2008/08/13 18:12:56 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
testConstraint testsetplatform [llength [info commands testsetplatform]]
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# This file tests the filename manipulation routines.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands. Sourcing this file into Tcl runs the tests and
# generates output for errors. No output means no errors were found.
#
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1999 by Scriptics Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: fileName.test,v 1.51.8.2 2008/08/14 13:08:45 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
testConstraint testsetplatform [llength [info commands testsetplatform]]
|
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
|
list [file exists ~//.nonexistant_file] [file exists ~///.nonexistant_file]
} {0 0}
test fileName-20.1 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -- TAGS tags Tags]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 1
test fileName-20.2 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- TAGS tags Tags]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 1
test fileName-20.3 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- *U*]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 0
test fileName-20.4 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- URGENT Urgent]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 0
# cleanup
catch {file delete -force C:/globTest}
|
|
|
|
|
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
|
list [file exists ~//.nonexistant_file] [file exists ~///.nonexistant_file]
} {0 0}
test fileName-20.1 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -- TAGS one two]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 1
test fileName-20.2 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- TAGS one two]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 1
test fileName-20.3 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- *U*]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 0
test fileName-20.4 {Bug 1750300} -setup {
set d [makeDirectory foo]
makeFile {} TAGS $d
} -body {
llength [glob -nocomplain -directory $d -types {} -- URGENT Urkle]
} -cleanup {
removeFile TAGS $d
removeDirectory foo
} -result 0
# cleanup
catch {file delete -force C:/globTest}
|