mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-28 16:00:22 +02:00
Adjust BOM tests to reflect the fact that big endian is used by default.
* test-suite/tests/ports.test ("BOM not discarded unless at start of UTF-16 stream", "BOM not discarded unless at start of UTF-32 stream"): Adjust tests to reflect the fact that, in the absence of a BOM, big endian will be used by default for the "UTF-16" and "UTF-32" encodings.
This commit is contained in:
parent
f480a98e9a
commit
3f315b6433
1 changed files with 2 additions and 12 deletions
|
@ -1686,11 +1686,7 @@
|
|||
|
||||
(pass-if-equal "BOM not discarded unless at start of UTF-16 stream"
|
||||
"a\uFEFFb"
|
||||
(let ((be (bv-read-test "utf-16" #vu8(#x00 #x61 #xFE #xFF #x00 #x62)))
|
||||
(le (bv-read-test "utf-16" #vu8(#x61 #x00 #xFF #xFE #x62 #x00))))
|
||||
(if (char=? #\a (string-ref be 0))
|
||||
be
|
||||
le)))
|
||||
(bv-read-test "utf-16" #vu8(#x00 #x61 #xFE #xFF #x00 #x62)))
|
||||
|
||||
(pass-if-equal "BOM discarded from start of UTF-16 stream (LE)"
|
||||
"a"
|
||||
|
@ -1777,15 +1773,9 @@
|
|||
|
||||
(pass-if-equal "BOM not discarded unless at start of UTF-32 stream"
|
||||
"a\uFEFFb"
|
||||
(let ((be (bv-read-test "UTF-32" #vu8(#x00 #x00 #x00 #x61
|
||||
(bv-read-test "UTF-32" #vu8(#x00 #x00 #x00 #x61
|
||||
#x00 #x00 #xFE #xFF
|
||||
#x00 #x00 #x00 #x62)))
|
||||
(le (bv-read-test "UTF-32" #vu8(#x61 #x00 #x00 #x00
|
||||
#xFF #xFE #x00 #x00
|
||||
#x62 #x00 #x00 #x00))))
|
||||
(if (char=? #\a (string-ref be 0))
|
||||
be
|
||||
le)))
|
||||
|
||||
(pass-if-equal "BOM discarded from start of UTF-32 stream (LE)"
|
||||
"a"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue