summaryrefslogtreecommitdiffstats
path: root/tests/registry.test
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2007-03-17 22:31:40 (GMT)
committerKevin B Kenny <kennykb@acm.org>2007-03-17 22:31:40 (GMT)
commitcad5197fbd7951c710146d8333f06a1e1b178211 (patch)
tree47da7b59190c06ddeded1a5fe98e19ebaa6180ff /tests/registry.test
parentdc483516b0161a29c1c349f594a80ddcc2a8f9ff (diff)
downloadtcl-cad5197fbd7951c710146d8333f06a1e1b178211.zip
tcl-cad5197fbd7951c710146d8333f06a1e1b178211.tar.gz
tcl-cad5197fbd7951c710146d8333f06a1e1b178211.tar.bz2
* win/tclWinReg.c (GetKeyNames): Size the buffer for enumerating
key names correctly, so that Unicode names exceeding 127 chars can be retrieved without crashing. [Bug 1682211] * tests/registry.test (registry-4.9): Added test case for the above bug.
Diffstat (limited to 'tests/registry.test')
-rw-r--r--tests/registry.test22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/registry.test b/tests/registry.test
index 28027d5..742a8e5 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.19 2006/03/21 11:12:29 dkf Exp $
+# RCS: @(#) $Id: registry.test,v 1.20 2007/03/17 22:31:41 kennykb Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -249,6 +249,20 @@ test registry-4.8 {GetKeyNames: Unicode} {win reg nt} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} "baz\u30b7bar blat"
+test registry-4.9 {GetKeyNames: very long key [Bug 1682211]} {*}{
+ -constraints {win && reg}
+ -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
+ }
+ -body {
+ lsort [registry keys HKEY_CLASSES_ROOT\\TclFoobar]
+ }
+ -cleanup {
+ registry delete HKEY_CLASSES_ROOT\\TclFoobar
+ }} \
+ -result [list a b[string repeat x 254] c]
test registry-5.1 {GetType} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
@@ -600,3 +614,9 @@ test registry-12.5 {BroadcastValue} {win reg} {
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# tcl-indent-level: 4
+# fill-column: 78
+# End: