1
Fork 0
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:
Mark H Weaver 2013-04-14 01:50:47 -04:00
parent f480a98e9a
commit 3f315b6433

View file

@ -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"