Email list hosting service & mailing list manager


srfi-135 test suite Per Bothner 08 May 2017 15:29 UTC

I used the srfi-135 test suite as the base for the srfi-140 test suite.
(Thank for the many tests!)

There is a non-standard feature test for full-unicode-strings, with
this comment:

;;; The full-unicode feature doesn't imply full Unicode in strings,
;;; so these tests might fail even in a conforming implementation.

I don't understand or believe that comment.

One test needs to be patched for non-big-endian systems:

diff --git a/texts-test.sps b/texts-test.sps
index 037f557..f631ad6 100644
--- a/texts-test.sps
+++ b/texts-test.sps
@@ -640,7 +640,8 @@
              (textual->utf16 (as-text "abc")))
      (fail 'textual->utf16))

-(or (equal? '#u8(254 255 0 97 0 98 0 99)
+(or (equal? (cond-expand (big-endian '#u8(254 255 0 97 0 98 0 99))
+                         (else '#u8(255 254 97 0 98 0 99 0)))
              (textual->utf16 "abc"))
      (fail 'textual->utf16))

There are various tests that assume you can specify the start position
of a range and leave out the end position:

     (textual->string "abc" 3)

However, the specification says:
     textual->string textual [start end] → string
It does *not* say:
     textual->string textual [start [end]] → string
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/