Tcl Source Code

Check-in [da0ebee405]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Added comment about the bug number to the knownBug constraint.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-2-1-branch | core-8-2-3 | scriptics-sc-1-1
Files: files | file ages | folders
SHA1: da0ebee4058ccfc26ca68ef4d12fd2d7265846b6
User & Date: jenn 1999-12-14 23:58:34
Context
2010-02-19
23:44
Fix sh quoting error reported in bash-3.1+ [Bug 1377619] Closed-Leaf check-in: fb13b258d6 user: nijtmans tags: core-8-2-1-branch
1999-12-14
23:58
Added comment about the bug number to the knownBug constraint. check-in: da0ebee405 user: jenn tags: core-8-2-1-branch, core-8-2-3, scriptics-sc-1-1
21:36
Modified tcltest library to set testConstraint(root) and testConstraint(notRoot) properly if UID is ... check-in: 77755a87bc user: jenn tags: core-8-2-1-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
1999-12-13  Jennifer Hom  <[email protected]>

	* library/tcltest1.0/tcltest.tcl: Modified testConstraint(root)
	and testConstraint(notRoot) so that they will be set to the proper
	values if the user name is 'root' or the uid is 0.

	* tests/fCmd.test: Added knownBug constraints to fCmd-8.1,
	fCmd-5.5, and fCmd-6.17; these are potentially dangerous tests.


1999-12-07  Jeff Hobbs  <[email protected]>

	* library/http2.1/http.tcl: fixed error handling in http::Event
	[Bug: 3752]

	* generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step






|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1999-12-13  Jennifer Hom  <[email protected]>

	* library/tcltest1.0/tcltest.tcl: Modified testConstraint(root)
	and testConstraint(notRoot) so that they will be set to the proper
	values if the user name is 'root' or the uid is 0.

	* tests/fCmd.test: Added knownBug constraints to fCmd-8.1,
	fCmd-5.5, and fCmd-6.17; these are potentially dangerous
	tests. [Bug: 3881]

1999-12-07  Jeff Hobbs  <[email protected]>

	* library/http2.1/http.tcl: fixed error handling in http::Event
	[Bug: 3752]

	* generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step

Changes to tests/fCmd.test.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
...
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
#
# Copyright (c) 1996-1997 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: fCmd.test,v 1.6.4.1 1999/12/14 21:36:44 jenn Exp $
#

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest
    namespace import ::tcltest::*
}

................................................................................
    createfile tf1
    createfile tf2
    file mkdir td1
    set x [list [file exist tf1] [file exist tf2] [file exist td1]]
    file delete tf1 td1 tf2
    lappend x [file exist tf1] [file exist tf2] [file exist tf3]
} {1 1 1 0 0 0}
test fCmd-5.5 {TclFileDeleteCmd: stop at first error} {notRoot unixOrPc knownBug} {
    cleanup
    createfile tf1
    createfile tf2
    file mkdir td1
    catch {file delete tf1 td1 $root tf2}
    list [file exist tf1] [file exist tf2] [file exist td1]
} {0 1 0}
................................................................................
    cleanup
    file mkdir [file join td1 td2]
    createfile [file join td1 td2 tf1]
    file mkdir td2
    list [catch {file rename -force td2 td1} msg] $msg
} [subst {1 {error renaming "td2" to "[file join td1 td2]": file already exists}}]

test fCmd-6.17 {CopyRenameOneFile: errno == EINVAL} {notRoot knownBug} {
    cleanup
    list [catch {file rename -force $root tf1} msg] $msg
} [subst {1 {error renaming "$root" to "tf1": trying to rename a volume or move a directory into itself}}]
test fCmd-6.18 {CopyRenameOneFile: errno != EXDEV} {notRoot} {
    cleanup
    file mkdir [file join td1 td2]
    createfile [file join td1 td2 tf1]
................................................................................
    createfile --
    createfile -force
    file delete -force -force -- -- -force
    list [catch {glob -- -- -force} msg] $msg
} {1 {no files matched glob patterns "-- -force"}}

test fCmd-8.1 {FileBasename: basename of ~user: argc == 1 && *path == ~} \
	{unixOnly notRoot knownBug} {
    file mkdir td1
    file attr td1 -perm 040000
    set result [list [catch {file rename ~$user td1} msg] $msg]
    file delete -force td1
    set result
} "1 {error renaming \"~$user\" to \"td1/[file tail ~$user]\": permission denied}"







|







 







|







 







|







 







|







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
...
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
...
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
#
# Copyright (c) 1996-1997 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: fCmd.test,v 1.6.4.2 1999/12/14 23:58:35 jenn Exp $
#

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest
    namespace import ::tcltest::*
}

................................................................................
    createfile tf1
    createfile tf2
    file mkdir td1
    set x [list [file exist tf1] [file exist tf2] [file exist td1]]
    file delete tf1 td1 tf2
    lappend x [file exist tf1] [file exist tf2] [file exist tf3]
} {1 1 1 0 0 0}
test fCmd-5.5 {TclFileDeleteCmd: stop at first error} {notRoot unixOrPc knownBug3881} {
    cleanup
    createfile tf1
    createfile tf2
    file mkdir td1
    catch {file delete tf1 td1 $root tf2}
    list [file exist tf1] [file exist tf2] [file exist td1]
} {0 1 0}
................................................................................
    cleanup
    file mkdir [file join td1 td2]
    createfile [file join td1 td2 tf1]
    file mkdir td2
    list [catch {file rename -force td2 td1} msg] $msg
} [subst {1 {error renaming "td2" to "[file join td1 td2]": file already exists}}]

test fCmd-6.17 {CopyRenameOneFile: errno == EINVAL} {notRoot knownBug3881} {
    cleanup
    list [catch {file rename -force $root tf1} msg] $msg
} [subst {1 {error renaming "$root" to "tf1": trying to rename a volume or move a directory into itself}}]
test fCmd-6.18 {CopyRenameOneFile: errno != EXDEV} {notRoot} {
    cleanup
    file mkdir [file join td1 td2]
    createfile [file join td1 td2 tf1]
................................................................................
    createfile --
    createfile -force
    file delete -force -force -- -- -force
    list [catch {glob -- -- -force} msg] $msg
} {1 {no files matched glob patterns "-- -force"}}

test fCmd-8.1 {FileBasename: basename of ~user: argc == 1 && *path == ~} \
	{unixOnly notRoot knownBug3881} {
    file mkdir td1
    file attr td1 -perm 040000
    set result [list [catch {file rename ~$user td1} msg] $msg]
    file delete -force td1
    set result
} "1 {error renaming \"~$user\" to \"td1/[file tail ~$user]\": permission denied}"