Fossil SCM

In the test for the UTF-8/UTF-16 detection functions, use the right byte-order-mark for the endianness of the machine.

mistachkin 2013-03-08 00:46 trunk
Commit 05ac588496171bc1e030a7340e1ad7b4cf894922
1 file changed +5 -4
+5 -4
--- test/utf.test
+++ test/utf.test
@@ -31,14 +31,15 @@
3131
0 binary \
3232
1 binary \
3333
2 unicode \
3434
]
3535
36
-array set bom [list \
37
- 0 "" \
38
- 1 \xEF\xBB\xBF \
39
- 2 \xFF\xFE \
36
+array set bom [list \
37
+ 0 "" \
38
+ 1 \xEF\xBB\xBF \
39
+ 2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
40
+ "\xFF\xFE" : "\xFE\xFF"}] \
4041
]
4142
4243
array set data [list \
4344
0 "" \
4445
1 A \
4546
--- test/utf.test
+++ test/utf.test
@@ -31,14 +31,15 @@
31 0 binary \
32 1 binary \
33 2 unicode \
34 ]
35
36 array set bom [list \
37 0 "" \
38 1 \xEF\xBB\xBF \
39 2 \xFF\xFE \
 
40 ]
41
42 array set data [list \
43 0 "" \
44 1 A \
45
--- test/utf.test
+++ test/utf.test
@@ -31,14 +31,15 @@
31 0 binary \
32 1 binary \
33 2 unicode \
34 ]
35
36 array set bom [list \
37 0 "" \
38 1 \xEF\xBB\xBF \
39 2 [expr {$tcl_platform(byteOrder) eq "littleEndian" ? \
40 "\xFF\xFE" : "\xFE\xFF"}] \
41 ]
42
43 array set data [list \
44 0 "" \
45 1 A \
46

Keyboard Shortcuts

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