Fossil SCM

Prevent the 'array set' commands in the 'utf.test' file from causing problems if there are pre-existing scalar variables.

mistachkin 2016-01-11 19:46 trunk
Commit ad6de6383391bd4d55f33b41d22795f3b387eec8
1 file changed +4
--- test/utf.test
+++ test/utf.test
@@ -39,26 +39,29 @@
3939
test utf-check-$testname.$i {$::RESULT eq $result}
4040
incr i
4141
}
4242
}
4343
44
+unset -nocomplain enc
4445
array set enc [list \
4546
0 binary \
4647
1 binary \
4748
2 unicode \
4849
3 unicode-reverse \
4950
]
5051
52
+unset -nocomplain bom
5153
array set bom [list \
5254
0 "" \
5355
1 \xEF\xBB\xBF \
5456
2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
5557
"\xFF\xFE" : "\xFE\xFF"}] \
5658
3 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
5759
"\xFE\xFF" : "\xFF\xFE"}] \
5860
]
5961
62
+unset -nocomplain data
6063
array set data [list \
6164
0 "" \
6265
1 \r \
6366
2 \n \
6467
3 \r\n \
@@ -239,10 +242,11 @@
239242
178 \xF4\x90\x80\x80\r \
240243
179 \xF4\x90\x80\x80\n \
241244
180 \xF4\x90\x80\x80\r\n \
242245
]
243246
247
+unset -nocomplain extraData
244248
array set extraData [list \
245249
0 "" \
246250
1 Z \
247251
]
248252
249253
--- test/utf.test
+++ test/utf.test
@@ -39,26 +39,29 @@
39 test utf-check-$testname.$i {$::RESULT eq $result}
40 incr i
41 }
42 }
43
 
44 array set enc [list \
45 0 binary \
46 1 binary \
47 2 unicode \
48 3 unicode-reverse \
49 ]
50
 
51 array set bom [list \
52 0 "" \
53 1 \xEF\xBB\xBF \
54 2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
55 "\xFF\xFE" : "\xFE\xFF"}] \
56 3 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
57 "\xFE\xFF" : "\xFF\xFE"}] \
58 ]
59
 
60 array set data [list \
61 0 "" \
62 1 \r \
63 2 \n \
64 3 \r\n \
@@ -239,10 +242,11 @@
239 178 \xF4\x90\x80\x80\r \
240 179 \xF4\x90\x80\x80\n \
241 180 \xF4\x90\x80\x80\r\n \
242 ]
243
 
244 array set extraData [list \
245 0 "" \
246 1 Z \
247 ]
248
249
--- test/utf.test
+++ test/utf.test
@@ -39,26 +39,29 @@
39 test utf-check-$testname.$i {$::RESULT eq $result}
40 incr i
41 }
42 }
43
44 unset -nocomplain enc
45 array set enc [list \
46 0 binary \
47 1 binary \
48 2 unicode \
49 3 unicode-reverse \
50 ]
51
52 unset -nocomplain bom
53 array set bom [list \
54 0 "" \
55 1 \xEF\xBB\xBF \
56 2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
57 "\xFF\xFE" : "\xFE\xFF"}] \
58 3 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
59 "\xFE\xFF" : "\xFF\xFE"}] \
60 ]
61
62 unset -nocomplain data
63 array set data [list \
64 0 "" \
65 1 \r \
66 2 \n \
67 3 \r\n \
@@ -239,10 +242,11 @@
242 178 \xF4\x90\x80\x80\r \
243 179 \xF4\x90\x80\x80\n \
244 180 \xF4\x90\x80\x80\r\n \
245 ]
246
247 unset -nocomplain extraData
248 array set extraData [list \
249 0 "" \
250 1 Z \
251 ]
252
253

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button