Fix test, now that I understand what's going on.
authorChris Hanson <org/chris-hanson/cph>
Tue, 7 Mar 2017 00:33:42 +0000 (16:33 -0800)
committerChris Hanson <org/chris-hanson/cph>
Tue, 7 Mar 2017 00:33:42 +0000 (16:33 -0800)
src/runtime/ustring.scm
tests/runtime/test-string.scm

index ab6c627b1f1ddbaa292fc1018812c7c1f50c8bb6..382080a9ff8f87f900889eb6d43b102bd397fbf4 100644 (file)
@@ -791,7 +791,7 @@ USA.
        (if (fix:< i1 n)
            (let ((wb1 (get-wb i1)))
              (cond ((select:extender wb1)
-                    (t1-!breaker wb0 i1 ctx))
+                    (t1-!breaker (if (select:zwj wb0) wb1 wb0) i1 ctx))
                    ((select:breaker wb1)
                     (t1-breaker wb1 i1 (break i1 ctx)))
                    (else
@@ -856,6 +856,9 @@ USA.
 (define select:extender
   (make-selector wb-names '(extend format zwj)))
 
+(define select:zwj
+  (make-selector wb-names '(zwj)))
+
 (define wb-states
   (make-vector (vector-length wb-names)
               (lambda (wb1 wb2 k1 k2)
index 0feb721c5f9b076918beab991c76877ea96ab100..3e12df3ef8e2898d8cfc548e79581bb6da77e27f 100644 (file)
@@ -2356,11 +2356,9 @@ USA.
         (#t #\x200D #t #\x1F3FB #t)
         (#t #\x200D #f #\x0308 #t #\x1F3FB #t)
         (#t #\x200D #f #\x2764 #t)
-        ;; Not clear why this is correct:
-        ;; (#t #\x200D #f #\x0308 #t #\x2764 #t)
+        (#t #\x200D #f #\x0308 #t #\x2764 #t)
         (#t #\x200D #f #\x1F466 #t)
-        ;; Not clear why this is correct:
-        ;; (#t #\x200D #f #\x0308 #t #\x1F466 #t)
+        (#t #\x200D #f #\x0308 #t #\x1F466 #t)
         (#t #\x200D #f #\x00AD #t)
         (#t #\x200D #f #\x0308 #f #\x00AD #t)
         (#t #\x200D #f #\x0300 #t)