diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2009-11-10 22:32:38 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2009-11-10 22:32:38 (GMT) |
commit | 9583d3790107a8b094e98be8b587b484eed858c3 (patch) | |
tree | acd982f45df30f67b0cf223361d0c390177c3f4a | |
parent | 20e02f9ded385a388606c860b9fd95ba799bde09 (diff) | |
download | tcl-9583d3790107a8b094e98be8b587b484eed858c3.zip tcl-9583d3790107a8b094e98be8b587b484eed858c3.tar.gz tcl-9583d3790107a8b094e98be8b587b484eed858c3.tar.bz2 |
Fixed a number of test issues for Vista and Win7.
These test failures are due to the more restrictive permissions on
the newer versions of Windows.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tests/fCmd.test | 31 | ||||
-rw-r--r-- | tests/registry.test | 480 | ||||
-rwxr-xr-x | tests/tcltest.test | 3 | ||||
-rw-r--r-- | tests/winFCmd.test | 79 |
5 files changed, 337 insertions, 263 deletions
@@ -1,3 +1,10 @@ +2009-11-10 Pat Thoyts <patthoyts@users.sourceforge.net> + + * tests/fCmd.test: Fixed a number of issues for Vista + * tests/registry.test: and Win7 that are due to restricted + * tests/tcltest.test: permissions under UAC. + * tests/winFCmd.test: + 2009-11-10 Stuart Cassoff <stwo@users.sf.net> * win/README: [bug 2459744]: Removed outdated Msys + Mingw info. diff --git a/tests/fCmd.test b/tests/fCmd.test index 1491c76..170a155 100644 --- a/tests/fCmd.test +++ b/tests/fCmd.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: fCmd.test,v 1.26.2.9 2007/05/17 14:18:42 dgp Exp $ +# RCS: @(#) $Id: fCmd.test,v 1.26.2.10 2009/11/10 22:32:39 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -23,6 +23,9 @@ tcltest::testConstraint testchmod [string equal testchmod [info commands testchm tcltest::testConstraint notNetworkFilesystem 0 testConstraint 95or98 [expr {[testConstraint 95] || [testConstraint 98]}] testConstraint 2000orNewer [expr {![testConstraint 95or98]}] +testConstraint winVista 0 +testConstraint win2000orXP 0 +testConstraint winOlderThan2000 0 # Several tests require need to match results against the unix username set user {} @@ -36,6 +39,20 @@ if {$tcl_platform(platform) == "unix"} { } } +# Also used in winFCmd... +if {[testConstraint winOnly]} { + set major [string index $tcl_platform(osVersion) 0] + if {[testConstraint nt] && $major > 4} { + if {$major > 5} { + testConstraint winVista 1 + } elseif {$major == 5} { + testConstraint win2000orXP 1 + } + } else { + testConstraint winOlderThan2000 1 + } +} + proc createfile {file {string a}} { set f [open $file w] puts -nonewline $f $string @@ -706,7 +723,7 @@ test fCmd-9.3 {file rename: comprehensive: file to new name} {notRoot testchmod} file rename tf2 tf4 list [lsort [glob tf*]] [file writable tf3] [file writable tf4] } {{tf3 tf4} 1 0} -test fCmd-9.4 {file rename: comprehensive: dir to new name} {unixOrPc notRoot testchmod} { +test fCmd-9.4 {file rename: comprehensive: dir to new name} {unixOrPc notRoot testchmod win2000orXP} { cleanup file mkdir td1 td2 testchmod 555 td2 @@ -723,7 +740,7 @@ test fCmd-9.5 {file rename: comprehensive: file to self} {notRoot testchmod} { file rename -force tf2 tf2 list [contents tf1] [contents tf2] [file writable tf1] [file writable tf2] } {tf1 tf2 1 0} -test fCmd-9.6 {file rename: comprehensive: dir to self} {notRoot unixOrPc testchmod} { +test fCmd-9.6 {file rename: comprehensive: dir to self} {notRoot unixOrPc testchmod win2000orXP} { cleanup file mkdir td1 file mkdir td2 @@ -799,12 +816,12 @@ test fCmd-9.9 {file rename: comprehensive: dir to non-empty dir} {notRoot testch file mkdir tds2 file mkdir [file join tdd1 tds1 xxx] file mkdir [file join tdd2 tds2 xxx] - if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} { + if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} { testchmod 555 tds2 } set a1 [list [catch {file rename -force tds1 tdd1} msg] $msg] set a2 [list [catch {file rename -force tds2 tdd2} msg] $msg] - if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} { + if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} { set w2 [file writable tds2] } else { set w2 0 @@ -827,12 +844,12 @@ test fCmd-9.11 {file rename: comprehensive: dir to new name and dir} {notRoot te file mkdir td1 file mkdir td2 file mkdir td3 - if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} { + if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} { testchmod 555 td2 } file rename td1 [file join td3 td3] file rename td2 [file join td3 td4] - if {$tcl_platform(platform) != "unix" && $tcl_platform(platform) != "macintosh"} { + if {!([testConstraint unix] || [testConstraint winVista]) && $tcl_platform(platform) != "macintosh"} { set w4 [file writable [file join td3 td4]] } else { set w4 0 diff --git a/tests/registry.test b/tests/registry.test index 63ac403..3639286 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -10,7 +10,7 @@ # Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: registry.test,v 1.12.2.3 2007/03/17 22:41:05 kennykb Exp $ +# RCS: @(#) $Id: registry.test,v 1.12.2.4 2009/11/10 22:32:39 patthoyts Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -121,395 +121,395 @@ test registry-2.3 {DeleteKey: bad key} {pcOnly} { list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg } {1 {bad key: cannot delete root keys}} test registry-2.4 {DeleteKey: subkey at root level} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry keys HKEY_CLASSES_ROOT TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry keys HKEY_CURRENT_USER TclFoobar } {} test registry-2.5 {DeleteKey: subkey below root level} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test - set result [registry keys HKEY_CLASSES_ROOT TclFoobar\\test] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test + registry delete HKEY_CURRENT_USER\\TclFoobar\\test + set result [registry keys HKEY_CURRENT_USER TclFoobar\\test] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-2.6 {DeleteKey: recursive delete} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - registry delete HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + registry delete HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] set result } {} test registry-2.7 {DeleteKey: trailing backslashes} {pcOnly english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar\\} msg] $msg + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar\\} msg] $msg } {1 {unable to delete key: The configuration registry key is invalid.}} test registry-2.8 {DeleteKey: failure} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar } {} test registry-2.9 {DeleteKey: unicode} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\a - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\b - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar\\a + registry set HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar\\b + registry delete HKEY_CURRENT_USER\\TclFoobar\\test\u00c7bar + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-3.1 {DeleteValue} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test1 blort - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blat - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\baz test1 - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar\\baz] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test1 blort + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test2 blat + registry delete HKEY_CURRENT_USER\\TclFoobar\\baz test1 + set result [registry values HKEY_CURRENT_USER\\TclFoobar\\baz] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } test2 test registry-3.2 {DeleteValue: bad key} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar test} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-3.3 {DeleteValue: bad value} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blort - set result [list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test1} msg] $msg] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz test2 blort + set result [list [catch {registry delete HKEY_CURRENT_USER\\TclFoobar test1} msg] $msg] + registry delete HKEY_CURRENT_USER\\TclFoobar set result -} {1 {unable to delete value "test1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} +} {1 {unable to delete value "test1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-3.4 {DeleteValue: Unicode} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz \u00c7test1 blort - registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz test2 blat - registry delete HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz \u00c7test1 - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz \u00c7test1 blort + registry set HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz test2 blat + registry delete HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz \u00c7test1 + set result [registry values HKEY_CURRENT_USER\\TclFoobar\\\u00c7baz] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } test2 test registry-4.1 {GetKeyNames: bad key} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-4.2 {GetKeyNames} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz} test registry-4.3 {GetKeyNames: remote key} {pcOnly nonPortable english} { - registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar\\baz - set result [registry keys \\\\gaspode\\HKEY_CLASSES_ROOT\\TclFoobar] - registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar + registry set \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar\\baz + set result [registry keys \\\\gaspode\\HKEY_CURRENT_USER\\TclFoobar] + registry delete \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar set result } {baz} test registry-4.4 {GetKeyNames: empty key} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-4.5 {GetKeyNames: patterns} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz blat} test registry-4.6 {GetKeyNames: names with spaces} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\ bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\ bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{baz bar} blat} test registry-4.7 {GetKeyNames: Unicode} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u00c7bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\u00c7bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "baz\u00c7bar blat" test registry-4.8 {GetKeyNames: Unicode} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u30b7bar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat - registry set HKEY_CLASSES_ROOT\\TclFoobar\\foo - set result [lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz\u30b7bar + registry set HKEY_CURRENT_USER\\TclFoobar\\blat + registry set HKEY_CURRENT_USER\\TclFoobar\\foo + set result [lsort [registry keys HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "baz\u30b7bar blat" test registry-4.9 {GetKeyNames: very long key [Bug 1682211]} \ -constraints {pcOnly} \ -setup { - registry set HKEY_CLASSES_ROOT\\TclFoobar\\a - registry set HKEY_CLASSES_ROOT\\TclFoobar\\b[string repeat x 254] - registry set HKEY_CLASSES_ROOT\\TclFoobar\\c + registry set HKEY_CURRENT_USER\\TclFoobar\\a + registry set HKEY_CURRENT_USER\\TclFoobar\\b[string repeat x 254] + registry set HKEY_CURRENT_USER\\TclFoobar\\c } \ -body { - lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar] + lsort [registry keys HKEY_CURRENT_USER\\TclFoobar] } \ -cleanup { - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar } \ -result [list a b[string repeat x 254] c] test registry-5.1 {GetType} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry type HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-5.2 {GetType} {pcOnly english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg -} {1 {unable to get type of value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} + registry set HKEY_CURRENT_USER\\TclFoobar + list [catch {registry type HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg +} {1 {unable to get type of value "val1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-5.3 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar none + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } none test registry-5.4 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } sz test registry-5.5 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } sz test registry-5.6 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar expand_sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } expand_sz test registry-5.7 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 binary + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } binary test registry-5.8 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 dword + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } dword test registry-5.9 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword_big_endian - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 dword_big_endian + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } dword_big_endian test registry-5.10 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 link + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } link test registry-5.11 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar multi_sz + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } multi_sz test registry-5.12 {GetType} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 resource_list + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } resource_list test registry-5.13 {GetType: unknown types} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24 - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 24 + set result [registry type HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 24 test registry-5.14 {GetType: Unicode} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1 1 24 - set result [registry type HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar va\u00c7l1 1 24 + set result [registry type HKEY_CURRENT_USER\\TclFoobar va\u00c7l1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 24 test registry-6.1 {GetValue} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry get HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-6.2 {GetValue} {pcOnly english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg -} {1 {unable to get value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}} + registry set HKEY_CURRENT_USER\\TclFoobar + list [catch {registry get HKEY_CURRENT_USER\\TclFoobar val1} msg] $msg +} {1 {unable to get value "val1" from key "HKEY_CURRENT_USER\TclFoobar": The system cannot find the file specified.}} test registry-6.3 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar none + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.4 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.5 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.6 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar expand_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.7 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 binary + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.8 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 0x20 dword + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 32 test registry-6.9 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword_big_endian - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 0x20 dword_big_endian + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 32 test registry-6.10 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 link + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.11 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 foobar multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.12 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo\ bar baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo\ bar baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{foo bar} baz} test registry-6.13 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-6.14 {GetValue: truncation of multivalues with null elements} \ {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {a {} b} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {a {} b} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } a test registry-6.15 {GetValue} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 resource_list + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.16 {GetValue: unknown types} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24 - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 1 24 + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } 1 test registry-6.17 {GetValue: Unicode value names} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val\u00c71 foobar multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val\u00c71] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val\u00c71 foobar multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val\u00c71] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } foobar test registry-6.18 {GetValue: values with Unicode strings} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u30b7r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u30b7r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba\u30b7r baz" test registry-6.19 {GetValue: values with Unicode strings} {pcOnly english} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u00c7r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u00c7r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba\u00c7r baz" test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} {pcOnly} { - registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u0000r baz} multi_sz - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u0000r baz} multi_sz + set result [registry get HKEY_CURRENT_USER\\TclFoobar val1] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba r baz" test registry-7.1 {GetValueNames: bad key} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry values HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry values HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-7.2 {GetValueNames} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar + set result [registry values HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } baz test registry-7.3 {GetValueNames} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar {} foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar {} foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{} baz blat} test registry-7.4 {GetValueNames: remote key} {pcOnly nonPortable english} { - registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar baz blat - set result [registry values \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar] - registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar + registry set \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar baz blat + set result [registry values \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar] + registry delete \\\\$hostname\\HKEY_CURRENT_USER\\TclFoobar set result } baz test registry-7.5 {GetValueNames: empty key} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry values HKEY_CLASSES_ROOT\\TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry values HKEY_CURRENT_USER\\TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-7.6 {GetValueNames: patterns} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {baz blat} test registry-7.7 {GetValueNames: names with spaces} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar baz\ bar foobar1 - registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2 - registry set HKEY_CLASSES_ROOT\\TclFoobar foo foobar3 - set result [lsort [registry values HKEY_CLASSES_ROOT\\TclFoobar b*]] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar baz\ bar foobar1 + registry set HKEY_CURRENT_USER\\TclFoobar blat foobar2 + registry set HKEY_CURRENT_USER\\TclFoobar foo foobar3 + set result [lsort [registry values HKEY_CURRENT_USER\\TclFoobar b*]] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {{baz bar} blat} @@ -519,15 +519,15 @@ test registry-8.1 {OpenSubKey} {pcOnly nonPortable english} { list [catch {registry keys {\\mom\HKEY_LOCAL_MACHINE}} msg] $msg } {1 {unable to open key: Access is denied.}} test registry-8.2 {OpenSubKey} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } TclFoobar test registry-8.3 {OpenSubKey} {pcOnly english} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg + registry delete HKEY_CURRENT_USER\\TclFoobar + list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-9.1 {ParseKeyName: bad keys} {pcOnly} { @@ -552,44 +552,44 @@ test registry-9.7 {ParseKeyName: bad keys} {pcOnly} { list [catch {registry values foobar} msg] $msg } {1 {bad root name "foobar": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}} test registry-9.8 {ParseKeyName: null keys} {pcOnly} { - list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg + list [catch {registry delete HKEY_CURRENT_USER\\} msg] $msg } {1 {bad key: cannot delete root keys}} test registry-9.9 {ParseKeyName: null keys} {pcOnly english} { - list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar\\baz} msg] $msg + list [catch {registry keys HKEY_CURRENT_USER\\TclFoobar\\baz} msg] $msg } {1 {unable to open key: The system cannot find the file specified.}} test registry-10.1 {RecursiveDeleteKey} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - registry delete HKEY_CLASSES_ROOT\\TclFoobar - set result [registry keys HKEY_CLASSES_ROOT TclFoobar] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + registry delete HKEY_CURRENT_USER\\TclFoobar + set result [registry keys HKEY_CURRENT_USER TclFoobar] set result } {} test registry-10.2 {RecursiveDeleteKey} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1 - registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3 - set result [registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test4] - registry delete HKEY_CLASSES_ROOT\\TclFoobar + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\test1 + registry set HKEY_CURRENT_USER\\TclFoobar\\test2\\test3 + set result [registry delete HKEY_CURRENT_USER\\TclFoobar\\test2\\test4] + registry delete HKEY_CURRENT_USER\\TclFoobar set result } {} test registry-11.1 {SetValue: recursive creation} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] } foobar test registry-11.2 {SetValue: modification} {pcOnly} { - registry delete HKEY_CLASSES_ROOT\\TclFoobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar - registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat frob - set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat] + registry delete HKEY_CURRENT_USER\\TclFoobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat foobar + registry set HKEY_CURRENT_USER\\TclFoobar\\baz blat frob + set result [registry get HKEY_CURRENT_USER\\TclFoobar\\baz blat] } frob test registry-11.3 {SetValue: failure} {pcOnly nonPortable english} { # This test will only succeed if the current user does not have registry # access on the specified machine. - list [catch {registry set {\\mom\HKEY_CLASSES_ROOT\TclFoobar} bar foobar} msg] $msg + list [catch {registry set {\\mom\HKEY_CURRENT_USER\TclFoobar} bar foobar} msg] $msg } {1 {unable to open key: Access is denied.}} test registry-12.1 {BroadcastValue} {pcOnly} { diff --git a/tests/tcltest.test b/tests/tcltest.test index c40826b..eabc39a 100755 --- a/tests/tcltest.test +++ b/tests/tcltest.test @@ -6,7 +6,7 @@ # Copyright (c) 2000 by Ajuba Solutions # All rights reserved. # -# RCS: @(#) $Id: tcltest.test,v 1.37.2.11 2006/03/19 22:47:30 vincentdarley Exp $ +# RCS: @(#) $Id: tcltest.test,v 1.37.2.12 2009/11/10 22:32:39 patthoyts Exp $ # Note that there are several places where the value of # tcltest::currentFailure is stored/reset in the -setup/-cleanup @@ -690,6 +690,7 @@ switch $tcl_platform(platform) { file attributes $notWriteableDir -permissions 777 } default { + catch {testchmod 777 $notWriteableDir} catch {file attributes $notWriteableDir -readonly 0} } } diff --git a/tests/winFCmd.test b/tests/winFCmd.test index 159317b..d566b63 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.9 2006/03/19 22:47:30 vincentdarley Exp $ +# RCS: @(#) $Id: winFCmd.test,v 1.20.2.10 2009/11/10 22:32:39 patthoyts Exp $ # if {[lsearch [namespace children] ::tcltest] == -1} { @@ -540,8 +540,15 @@ test winFCmd-6.1 {TclpRemoveDirectory: errno: EACCES} {pcOnly} { cleanup file mkdir td1 testchmod 000 td1 - testfile rmdir td1 - file exists td1 + catch { + testfile rmdir td1 + file exists td1 + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {0} test winFCmd-6.2 {TclpRemoveDirectory: errno: EEXIST} {pcOnly} { cleanup @@ -580,8 +587,15 @@ test winFCmd-6.9 {TclpRemoveDirectory: errno == EACCES} {pcOnly} { cleanup file mkdir td1 testchmod 000 td1 - testfile rmdir td1 - file exists td1 + catch { + testfile rmdir td1 + file exists td1 + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {0} test winFCmd-6.10 {TclpRemoveDirectory: attr == -1} {pcOnly 95} { cleanup @@ -605,8 +619,15 @@ test winFCmd-6.13 {TclpRemoveDirectory: write-protected} {pcOnly} { cleanup file mkdir td1 testchmod 000 td1 - testfile rmdir td1 - file exists td1 + catch { + testfile rmdir td1 + file exists td1 + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {0} test winFCmd-6.14 {TclpRemoveDirectory: check if empty dir} {pcOnly 95} { cleanup @@ -690,8 +711,15 @@ test winFCmd-7.11 {TraverseWinTree: call TraversalCopy: DOTREE_PRED} {pcOnly} { file mkdir td1 createfile td1/tf1 tf1 testchmod 000 td1 - testfile cpdir td1 td2 - list [file exists td2] [file writable td2] + catch { + testfile cpdir td1 td2 + list [file exists td2] [file writable td2] + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {1 1} test winFCmd-7.12 {TraverseWinTree: call TraversalDelete: DOTREE_PRED} {pcOnly} { cleanup @@ -746,8 +774,15 @@ test winFCmd-7.19 {TraverseWinTree: call TraversalCopy: DOTREE_POSTD} {pcOnly} { file mkdir td1 createfile td1/tf1 tf1 testchmod 000 td1 - testfile cpdir td1 td2 - list [file exists td2] [file writable td2] + catch { + testfile cpdir td1 td2 + list [file exists td2] [file writable td2] + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {1 1} test winFCmd-7.20 {TraverseWinTree: call TraversalDelete: DOTREE_POSTD} \ {pcOnly} { @@ -771,8 +806,15 @@ test winFCmd-8.2 {TraversalCopy: DOTREE_PRED} {pcOnly} { cleanup file mkdir td1/td2 testchmod 000 td1 - testfile cpdir td1 td2 - list [file writable td1] [file writable td1/td2] + catch { + testfile cpdir td1 td2 + list [file writable td1] [file writable td1/td2] + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {0 1} test winFCmd-8.3 {TraversalCopy: DOTREE_POSTD} {pcOnly} { cleanup @@ -798,8 +840,15 @@ test winFCmd-9.3 {TraversalDelete: DOTREE_PRED} {pcOnly} { cleanup file mkdir td1/td2 testchmod 000 td1 - testfile rmdir -force td1 - file exists td1 + catch { + testfile rmdir -force td1 + file exists td1 + } r + catch { + testchmod 777 td1 + cleanup + } + set r } {0} test winFCmd-9.4 {TraversalDelete: DOTREE_POSTD} {pcOnly} { cleanup |