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.
Commit
05ac588496171bc1e030a7340e1ad7b4cf894922
Parent
e3ae41483d5494d…
1 file changed
+5
-4
+5
-4
| --- test/utf.test | ||
| +++ test/utf.test | ||
| @@ -31,14 +31,15 @@ | ||
| 31 | 31 | 0 binary \ |
| 32 | 32 | 1 binary \ |
| 33 | 33 | 2 unicode \ |
| 34 | 34 | ] |
| 35 | 35 | |
| 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"}] \ | |
| 40 | 41 | ] |
| 41 | 42 | |
| 42 | 43 | array set data [list \ |
| 43 | 44 | 0 "" \ |
| 44 | 45 | 1 A \ |
| 45 | 46 |
| --- 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 |