[pango/hyphen-log-attr: 5/6] test-break: Print out hyphens




commit eec18743565d1da58179bac5dab4baac8837bd37
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Aug 24 22:44:14 2021 -0400

    test-break: Print out hyphens
    
    Print out all the log attrs we have.
    
    Update expected test outputs.

 pango/break.c                | 10 +++-------
 tests/breaks/eleven.expected | 13 +++++++------
 tests/breaks/four.expected   | 13 +++++++------
 tests/breaks/nine.expected   | 13 +++++++------
 tests/breaks/one.expected    |  1 +
 tests/breaks/ten.expected    | 13 +++++++------
 tests/breaks/three.expected  | 13 +++++++------
 tests/breaks/two.expected    |  1 +
 tests/test-break.c           | 31 ++++++++++++++++++++++++++-----
 9 files changed, 66 insertions(+), 42 deletions(-)
---
diff --git a/pango/break.c b/pango/break.c
index 56d0958d..de4bfa23 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1720,16 +1720,10 @@ break_attrs (const char   *text,
 
       if (attr->klass->type == PANGO_ATTR_ALLOW_BREAKS)
         pango_attr_list_insert (&list, pango_attribute_copy (attr));
-      if (attr->klass->type == PANGO_ATTR_INSERT_HYPHENS)
+      else if (attr->klass->type == PANGO_ATTR_INSERT_HYPHENS)
         pango_attr_list_insert (&hyphens, pango_attribute_copy (attr));
     }
 
-  if (!_pango_attr_list_has_attributes (&list))
-    {
-      _pango_attr_list_destroy (&list);
-      return FALSE;
-    }
-
   _pango_attr_list_get_iterator (&list, &iter);
   do {
     const PangoAttribute *attr = pango_attr_iterator_get (&iter, PANGO_ATTR_ALLOW_BREAKS);
@@ -1789,6 +1783,8 @@ break_attrs (const char   *text,
       }
   } while (pango_attr_iterator_next (&iter));
 
+  _pango_attr_iterator_destroy (&iter);
+
   _pango_attr_list_destroy (&list);
   _pango_attr_list_destroy (&hyphens);
 
diff --git a/tests/breaks/eleven.expected b/tests/breaks/eleven.expected
index 45c7ad01..f5b26708 100644
--- a/tests/breaks/eleven.expected
+++ b/tests/breaks/eleven.expected
@@ -1,6 +1,7 @@
-Text:         ⁦❤⁩⁦️⁩⁦︎⁩⁦︎⁩  ⁦👨⁩[0x200d]⁦🦰⁩  ⁦👨⁩⁦🏿⁩[0x200d]⁦🦱⁩  ⁦0⁩⁦️⁩⁦⃣⁩  
⁦🏴⁩[0xe0075][0xe0073][0xe0063][0xe0061][0xe007f]  ⁦🇩⁩⁦🇪⁩⁦️⁩ [0x0a] 
-Breaks:     c     lc          lc           lc   lc                                              lc   c      c
-Whitespace:                                                                                          w      w
-Sentences:  bs                                                                                       e      b
-Words:      b     b           b            bs   be                                              b    b      b
-Graphemes:  b     b           b            b    b                                               b    b      b
+Text:         ⁦❤⁩ ⁦️⁩ ⁦︎⁩ ⁦︎⁩  ⁦👨⁩ [0x200d]⁦🦰⁩  ⁦👨⁩⁦🏿⁩ [0x200d]⁦🦱⁩  ⁦0⁩ ⁦️⁩ ⁦⃣⁩  
⁦🏴⁩[0xe0075][0xe0073][0xe0063][0xe0061][0xe007f]  ⁦🇩⁩⁦🇪⁩ ⁦️⁩ [0x0a] 
+Breaks:     c        lc           lc            lc     lc                                              lc    
c      c
+Whitespace:                                                                                                  
w      w
+Sentences:  bs                                                                                               
e      b
+Words:      b        b            b             bs     be                                              b     
b      b
+Graphemes:  b        b            b             b      b                                               b     
b      b
+Hyphens:       i i i    i             i            i i                                                     i 
        
diff --git a/tests/breaks/four.expected b/tests/breaks/four.expected
index 2f29d778..e94af24a 100644
--- a/tests/breaks/four.expected
+++ b/tests/breaks/four.expected
@@ -1,6 +1,7 @@
-Text:         ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩  [ ]  ⁦ห⁩ ⁦ร⁩⁦ื⁩ ⁦อ⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦ก⁩ 
⁦ล⁩ ⁦า⁩ ⁦ง⁩  [ ]  ⁦เ⁩ ⁦ป⁩⁦็⁩ ⁦น⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ร⁩ ⁦า⁩ ⁦ช⁩ ⁦ก⁩ ⁦า⁩ ⁦ร⁩   ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩  
 ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦จ⁩ ⁦ำ⁩   ⁦ช⁩ ⁦า⁩ ⁦ต⁩⁦ิ⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦เ⁩ ⁦ท⁩ ⁦ศ⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ 
⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦เ⁩ ⁦ป⁩⁦็⁩ ⁦น⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ใ⁩ ⁦น⁩   ⁦ก⁩ ⁦ล⁩⁦ุ⁩⁦่⁩ ⁦ม⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ 
⁦ท⁩   ⁦��
 �⁩⁦ึ⁩⁦่⁩ ⁦ง⁩   ⁦เ⁩ ⁦ป⁩⁦็⁩ ⁦น⁩   ⁦ก⁩ ⁦ล⁩⁦ุ⁩⁦่⁩ ⁦ม⁩   ⁦ย⁩⁦่⁩ ⁦อ⁩ ⁦ย⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩⁦ู⁩ ⁦ล⁩   
⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ข⁩ ⁦ร⁩⁦้⁩ ⁦า⁩  [ ]  ⁦ไ⁩ ⁦ท⁩  [ ]  ⁦ส⁩⁦ั⁩ ⁦น⁩ ⁦น⁩⁦ิ⁩ ⁦ษ⁩ ⁦ฐ⁩ ⁦า⁩ ⁦น⁩   ⁦ว⁩⁦่⁩ ⁦า⁩  [ ]  ⁦ภ⁩ 
⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ใ⁩ ⁦น⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩⁦ู⁩ ⁦ล⁩   ⁦น⁩⁦ี⁩⁦้⁩   ⁦ม⁩⁦ี⁩   ⁦ถ⁩⁦ิ⁩⁦่⁩ ⁦น⁩   ⁦ก⁩ ⁦ำ⁩ ⁦เ⁩ ⁦น⁩⁦ิ⁩ ⁦ด⁩  
 ⁦จ⁩ ⁦า⁩ ⁦ก⁩   ⁦ท⁩ ⁦า⁩ ⁦ง⁩   ⁦ต⁩ ⁦อ⁩ ⁦น⁩   ⁦ใ⁩ ⁦ต⁩⁦้⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦เ⁩ ⁦ท⁩ ⁦ศ⁩   �
 ��จ⁩⁦ี⁩ ⁦น⁩  [ ]  ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   ⁦น⁩⁦ั⁩ ⁦ก⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩ ⁦ศ⁩ ⁦า⁩ ⁦ส⁩ ⁦ต⁩ ⁦ร⁩⁦์⁩   ⁦บ⁩ ⁦า⁩ ⁦ง⁩   ⁦ส⁩⁦่⁩ 
⁦ว⁩ ⁦น⁩   ⁦เ⁩ ⁦ส⁩ ⁦น⁩ ⁦อ⁩   ⁦ว⁩⁦่⁩ ⁦า⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦น⁩⁦่⁩ ⁦า⁩   ⁦จ⁩ ⁦ะ⁩   ⁦ม⁩⁦ี⁩   
⁦ค⁩ ⁦ว⁩ ⁦า⁩ ⁦ม⁩   ⁦เ⁩ ⁦ช⁩⁦ื⁩⁦่⁩ ⁦อ⁩ ⁦ม⁩   ⁦โ⁩ ⁦ย⁩ ⁦ง⁩   ⁦ก⁩⁦ั⁩ ⁦บ⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩⁦ู⁩ ⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩ 
  ⁦อ⁩ ⁦อ⁩   ⁦ส⁩ ⁦โ⁩ ⁦ต⁩ ⁦ร⁩  [ ]  ⁦เ⁩ ⁦อ⁩ ⁦เ⁩ ⁦ช⁩⁦ี⁩ ⁦ย⁩   ⁦ต⁩⁦ิ⁩ ⁦ก⁩  [ ]  ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩⁦ู⁩ ⁦ล⁩   ⁦ภ��
 � ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦อ⁩ ⁦อ⁩   ⁦ส⁩ ⁦โ⁩ ⁦ต⁩ ⁦ร⁩ ⁦น⁩⁦ี⁩ ⁦เ⁩ ⁦ซ⁩⁦ี⁩ ⁦ย⁩ ⁦น⁩  [ ]  ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩⁦ู⁩ 
⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦จ⁩⁦ี⁩ ⁦น⁩  [ ]  ⁦ท⁩⁦ิ⁩ ⁦เ⁩ ⁦บ⁩ ⁦ต⁩  [0x0a] 
-Breaks:     c  c c c lc  c c c    lc c  c c    lc c c c lc  c c lc  c c c c    lc c  c lc  c c c lc  c c c c 
c lc  c c lc  c c c lc  c c c c lc  c c  lc  c c lc  c c c c c lc  c c c    lc c c c lc  c c lc  c  c lc  c c 
c lc  c lc  c   c lc  c c c lc  c lc    c lc  c  c lc  c   c lc   c c lc  c c lc  c c c  c lc  c c c lc  c  c 
c    lc c c    lc  c c  c c c c lc   c c    lc c c c lc  c lc  c c c  c lc    lc   lc    c lc  c c c  c lc  c 
c lc  c c lc  c c lc  c  lc  c c lc  c c c c c lc   c c    lc c c lc   c lc  c c c c c c c c  lc  c c lc   c 
c lc  c c c lc   c c    lc c c c lc  c c lc   c lc  c lc   lc  c c c lc  c   c c lc  c c lc   c lc  c c c  c 
lc  c c c lc  c lc  c c c c    lc c c c  c lc   c c    lc c c c  c lc  c c c lc  c lc  c c c c  c c  c c c    
lc c c lc  c c c  c lc  c c c lc   c c    lc  c c c c       c
-Whitespace:                  x            x                               x                                  
                                                                       x                                      
                                                                                                              
x         x                            x                                                                      
                                                      x                                                       
                  x                                                                                           
                        x                       x                                                      x      
                                   x              w       w
-Sentences:  bs                                                                                               
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                  e       b
-Words:      bs b b b bse b b be   bs b  b be   bs b b b bse b b bse b b b be   bs b  b bse b b b bse b b b b 
b bse b b bse b b b bse b b b b bse b b  bse b b bse b b b b b bse b b be   bs b b b bse b b bse b  b bse b b 
b bse b bse b   b bse b b b bse b bse   b bse b  b bse b   b bse  b b bse b b bse b b b  b bse b b b bse b  b 
be   bs b be   bs  b b  b b b b bse  b be   bs b b b bse b bse b b b  b bse   bse  bse   b bse b b b  b bse b 
b bse b b bse b b bse b  bse b b bse b b b b b bse  b be   bs b b bse  b bse b b b b b b b b  bse b b bse  b 
b bse b b b bse  b be   bs b b b bse b b bse  b bse b bse  bse b b b bse b   b b bse b b bse  b bse b b b  b 
bse b b b bse b bse b b b be   bs b b b  b bse  b be   bs b b b  b bse b b b bse b bse b b b b  b b  b b be   
bs b b bse b b b  b bse b b b bse  b be   bs  b b b be      b
-Graphemes:  b  b b b b   b b b    b  b  b b    b  b b b b   b b b   b b b b    b  b  b b   b b b b   b b b b 
b b   b b b   b b b b   b b b b b   b b  b   b b b   b b b b b b   b b b    b  b b b b   b b b   b  b b   b b 
b b   b b   b   b b   b b b b   b b     b b   b  b b   b   b b    b b b   b b b   b b b  b b   b b b b   b  b 
b    b  b b    b   b b  b b b b b    b b    b  b b b b   b b   b b b  b b     b    b     b b   b b b  b b   b 
b b   b b b   b b b   b  b   b b b   b b b b b b    b b    b  b b b    b b   b b b b b b b b  b   b b b    b 
b b   b b b b    b b    b  b b b b   b b b    b b   b b    b   b b b b   b   b b b   b b b    b b   b b b  b 
b   b b b b   b b   b b b b    b  b b b  b b    b b    b  b b b  b b   b b b b   b b   b b b b  b b  b b b    
b  b b b   b b b  b b   b b b b    b b    b   b b b b       b
+Text:         ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩  [ ]  ⁦ห⁩ ⁦ร⁩ ⁦ื⁩ ⁦อ⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦ก⁩ 
⁦ล⁩ ⁦า⁩ ⁦ง⁩  [ ]  ⁦เ⁩ ⁦ป⁩ ⁦็⁩ ⁦น⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ร⁩ ⁦า⁩ ⁦ช⁩ ⁦ก⁩ ⁦า⁩ ⁦ร⁩   ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩ 
  ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦จ⁩ ⁦ำ⁩   ⁦ช⁩ ⁦า⁩ ⁦ต⁩ ⁦ิ⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦เ⁩ ⁦ท⁩ ⁦ศ⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩  [ ]  ⁦ภ⁩ ⁦า⁩ 
⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦เ⁩ ⁦ป⁩ ⁦็⁩ ⁦น⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ใ⁩ ⁦น⁩   ⁦ก⁩ ⁦ล⁩ ⁦ุ⁩ ⁦่⁩ ⁦ม⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   
⁦ไ⁩ ⁦ท⁩  
  ⁦ซ⁩ ⁦ึ⁩ ⁦่⁩ ⁦ง⁩   ⁦เ⁩ ⁦ป⁩ ⁦็⁩ ⁦น⁩   ⁦ก⁩ ⁦ล⁩ ⁦ุ⁩ ⁦่⁩ ⁦ม⁩   ⁦ย⁩ ⁦่⁩ ⁦อ⁩ ⁦ย⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩ 
⁦ู⁩ ⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ข⁩ ⁦ร⁩ ⁦้⁩ ⁦า⁩  [ ]  ⁦ไ⁩ ⁦ท⁩  [ ]  ⁦ส⁩ ⁦ั⁩ ⁦น⁩ ⁦น⁩ ⁦ิ⁩ ⁦ษ⁩ ⁦ฐ⁩ ⁦า⁩ ⁦น⁩   ⁦ว⁩ ⁦่⁩ 
⁦า⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ใ⁩ ⁦น⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩ ⁦ู⁩ ⁦ล⁩   ⁦น⁩ ⁦ี⁩ ⁦้⁩   ⁦ม⁩ ⁦ี⁩   ⁦ถ⁩ ⁦ิ⁩ ⁦่⁩ ⁦น⁩   ⁦ก⁩ 
⁦ำ⁩ ⁦เ⁩ ⁦น⁩ ⁦ิ⁩ ⁦ด⁩   ⁦จ⁩ ⁦า⁩ ⁦ก⁩   ⁦ท⁩ ⁦า⁩ ⁦ง⁩   ⁦ต⁩ ⁦อ⁩ ⁦น⁩   ⁦ใ⁩ ⁦ต⁩ ⁦้⁩   ⁦ข⁩ ⁦อ⁩ ⁦ง⁩   ⁦ป⁩ ⁦ร⁩ ⁦ะ⁩ ⁦เ��
 � ⁦ท⁩ ⁦ศ⁩   ⁦จ⁩ ⁦ี⁩ ⁦น⁩  [ ]  ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   ⁦น⁩ ⁦ั⁩ ⁦ก⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩ ⁦ศ⁩ ⁦า⁩ ⁦ส⁩ ⁦ต⁩ ⁦ร⁩ ⁦์⁩   ⁦บ⁩ ⁦า⁩ 
⁦ง⁩   ⁦ส⁩ ⁦่⁩ ⁦ว⁩ ⁦น⁩   ⁦เ⁩ ⁦ส⁩ ⁦น⁩ ⁦อ⁩   ⁦ว⁩ ⁦่⁩ ⁦า⁩  [ ]  ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦ไ⁩ ⁦ท⁩ ⁦ย⁩   ⁦น⁩ ⁦่⁩ ⁦า⁩   ⁦จ⁩ 
⁦ะ⁩   ⁦ม⁩ ⁦ี⁩   ⁦ค⁩ ⁦ว⁩ ⁦า⁩ ⁦ม⁩   ⁦เ⁩ ⁦ช⁩ ⁦ื⁩ ⁦่⁩ ⁦อ⁩ ⁦ม⁩   ⁦โ⁩ ⁦ย⁩ ⁦ง⁩   ⁦ก⁩ ⁦ั⁩ ⁦บ⁩   ⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩ ⁦ู⁩ 
⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦อ⁩ ⁦อ⁩   ⁦ส⁩ ⁦โ⁩ ⁦ต⁩ ⁦ร⁩  [ ]  ⁦เ⁩ ⁦อ⁩ ⁦เ⁩ ⁦ช⁩ ⁦ี⁩ ⁦ย⁩   ⁦ต⁩ ⁦ิ⁩ ⁦ก⁩  [ ]  ⁦ต⁩ ⁦ร⁩ 
⁦ะ⁩ �
 ��ก⁩ ⁦ู⁩ ⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦อ⁩ ⁦อ⁩   ⁦ส⁩ ⁦โ⁩ ⁦ต⁩ ⁦ร⁩ ⁦น⁩ ⁦ี⁩ ⁦เ⁩ ⁦ซ⁩ ⁦ี⁩ ⁦ย⁩ ⁦น⁩  [ ]  ⁦แ⁩ ⁦ล⁩ ⁦ะ⁩   
⁦ต⁩ ⁦ร⁩ ⁦ะ⁩ ⁦ก⁩ ⁦ู⁩ ⁦ล⁩   ⁦ภ⁩ ⁦า⁩ ⁦ษ⁩ ⁦า⁩   ⁦จ⁩ ⁦ี⁩ ⁦น⁩  [ ]  ⁦ท⁩ ⁦ิ⁩ ⁦เ⁩ ⁦บ⁩ ⁦ต⁩  [0x0a] 
+Breaks:     c  c c c lc  c c c    lc c   c c    lc c c c lc  c c lc  c c c c    lc c   c lc  c c c lc  c c c 
c c lc  c c lc  c c c lc  c c c c lc  c c   lc  c c lc  c c c c c lc  c c c    lc c c c lc  c c lc  c   c lc  
c c c lc  c lc  c     c lc  c c c lc  c lc      c lc  c   c lc  c     c lc    c c lc  c c lc  c c c   c lc  c 
c c lc  c   c c    lc c c    lc   c c   c c c c lc    c c    lc c c c lc  c lc  c c c   c lc      lc    lc    
  c lc  c c c   c lc  c c lc  c c lc  c c lc  c   lc  c c lc  c c c c c lc    c c    lc c c lc    c lc  c c c 
c c c c c   lc  c c lc    c c lc  c c c lc    c c    lc c c c lc  c c lc    c lc  c lc    lc  c c c lc  c     
c c lc  c c lc    c lc  c c c   c lc  c c c lc  c lc  c c c c    lc c c c   c lc    c c    lc c c c   c lc  c 
c c lc  c lc  c c c c   c c   c c c    lc c c lc  c c c   c lc  c c c lc    c c    lc   c c c c       c
+Whitespace:                  x             x                               x                                 
                                                                          x                                   
                                                                                                              
              x         x                               x                                                     
                                                                                x                             
                                                x                                                             
                                                            x                         x                       
                                  x                                           x               w       w
+Sentences:  bs                                                                                               
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                                              
                                                                                              e       b
+Words:      bs b b b bse b b be   bs b   b be   bs b b b bse b b bse b b b be   bs b   b bse b b b bse b b b 
b b bse b b bse b b b bse b b b b bse b b   bse b b bse b b b b b bse b b be   bs b b b bse b b bse b   b bse 
b b b bse b bse b     b bse b b b bse b bse     b bse b   b bse b     b bse   b b bse b b bse b b b   b bse b 
b b bse b   b be   bs b be   bs   b b   b b b b bse   b be   bs b b b bse b bse b b b   b bse     bse   bse   
  b bse b b b   b bse b b bse b b bse b b bse b   bse b b bse b b b b b bse   b be   bs b b bse   b bse b b b 
b b b b b   bse b b bse   b b bse b b b bse   b be   bs b b b bse b b bse   b bse b bse   bse b b b bse b     
b b bse b b bse   b bse b b b   b bse b b b bse b bse b b b be   bs b b b   b bse   b be   bs b b b   b bse b 
b b bse b bse b b b b   b b   b b be   bs b b bse b b b   b bse b b b bse   b be   bs   b b b be      b
+Graphemes:  b  b b b b   b b b    b  b   b b    b  b b b b   b b b   b b b b    b  b   b b   b b b b   b b b 
b b b   b b b   b b b b   b b b b b   b b   b   b b b   b b b b b b   b b b    b  b b b b   b b b   b   b b   
b b b b   b b   b     b b   b b b b   b b       b b   b   b b   b     b b     b b b   b b b   b b b   b b   b 
b b b   b   b b    b  b b    b    b b   b b b b b     b b    b  b b b b   b b   b b b   b b       b     b     
  b b   b b b   b b   b b b   b b b   b b b   b   b   b b b   b b b b b b     b b    b  b b b     b b   b b b 
b b b b b   b   b b b     b b b   b b b b     b b    b  b b b b   b b b     b b   b b     b   b b b b   b     
b b b   b b b     b b   b b b   b b   b b b b   b b   b b b b    b  b b b   b b     b b    b  b b b   b b   b 
b b b   b b   b b b b   b b   b b b    b  b b b   b b b   b b   b b b b     b b    b    b b b b       b
+Hyphens:                               i                                             i                       
                                          i                                                           i       
                  i i                       i i         i         i i       i                       i         
          i                     i     i             i                                 i       i i     i     i 
i             i                                 i                           i                   i             
          i             i                   i                             i             i                 i i 
                i             i                                           i       i                 i         
                      i     i                           i                 i           i                
diff --git a/tests/breaks/nine.expected b/tests/breaks/nine.expected
index 957f67e5..818a78aa 100644
--- a/tests/breaks/nine.expected
+++ b/tests/breaks/nine.expected
@@ -1,6 +1,7 @@
-Text:         ⁦म⁩⁦ी⁩  [ ]  ⁦क⁩⁦ा⁩ ⁦च⁩  [ ]  ⁦ख⁩⁦ा⁩ ⁦ऊ⁩  [ ]  ⁦श⁩ ⁦क⁩ ⁦त⁩⁦ो⁩  ⁦,⁩ [ ]  ⁦म⁩ ⁦ल⁩⁦ा⁩  [ ]  
⁦त⁩⁦े⁩  [ ]  ⁦द⁩⁦ु⁩ ⁦ख⁩ ⁦त⁩  [ ]  ⁦न⁩⁦ा⁩ ⁦ह⁩  [0x0a]  ⁦म⁩⁦ै⁩⁦ं⁩  [ ]  ⁦क⁩⁦ा⁩⁦ँ⁩ ⁦च⁩  [ ]  ⁦ख⁩⁦ा⁩  [ ]  ⁦स⁩ 
⁦क⁩ ⁦त⁩⁦ा⁩  [ ]  ⁦ह⁩⁦ू⁩⁦ँ⁩  ⁦,⁩ [ ]  ⁦म⁩⁦ु⁩ ⁦झ⁩⁦े⁩  [ ]  ⁦उ⁩ ⁦स⁩  [ ]  ⁦स⁩⁦े⁩  [ ]  ⁦क⁩⁦ो⁩ ⁦ई⁩  [ ]  ⁦प⁩⁦ी⁩ 
⁦ड⁩⁦ा⁩  [ ]  ⁦न⁩ ⁦ह⁩⁦ी⁩⁦ं⁩  [ ]  ⁦ह⁩⁦ो⁩ ⁦त⁩  [0x0a]  ⁦ந⁩⁦ா⁩ ⁦ன⁩⁦்⁩  [ ]  ⁦க⁩ ⁦ண⁩⁦்⁩ ⁦ண⁩⁦ா⁩ ⁦ட⁩⁦ி⁩  [ ]  
⁦ச⁩⁦ா⁩ ⁦ப⁩⁦்⁩ ⁦ப⁩⁦ி⁩ ⁦ட⁩⁦ு⁩ ⁦வ⁩⁦ே⁩ ⁦ன⁩⁦்⁩  ⁦,⁩ [ ]  �
 ��அ⁩ ⁦த⁩ ⁦ன⁩⁦ா⁩ ⁦ல⁩⁦்⁩  [ ]  ⁦எ⁩ ⁦ன⁩ ⁦க⁩⁦்⁩ ⁦க⁩⁦ு⁩  [ ]  ⁦ஒ⁩ ⁦ர⁩⁦ு⁩  [ ]  ⁦க⁩⁦ே⁩ ⁦ட⁩⁦ு⁩ ⁦ம⁩⁦்⁩  [ ]  ⁦வ⁩ 
⁦ர⁩⁦ா⁩ ⁦த⁩  [0x0a]  ⁦ﻢ⁩ ⁦ﯾ⁩ ⁦ں⁩  [ ]  ⁦ﮎ⁩ ⁦ﺎ⁩ ⁦ﻨ⁩ ⁦ﭼ⁩  [ ]  ⁦ﮎ⁩ ⁦ھ⁩ ⁦ﺍ⁩  [ ]  ⁦ﺲ⁩ ⁦ﮑ⁩ ⁦ﺗ⁩ ⁦ﺍ⁩  [ ]  ⁦ہ⁩ ⁦ﻭ⁩ 
⁦ں⁩  [ ]  ⁦ﺍ⁩ ⁦ﻭ⁩ ⁦ﺭ⁩  [ ]  ⁦ﻢ⁩ ⁦ﺟ⁩ ⁦ھ⁩ ⁦ے⁩  [ ]  ⁦ﺖ⁩ ⁦ﮑ⁩ ⁦ﻠ⁩ ⁦ﯿ⁩ ⁦ﻓ⁩  [ ]  ⁦ﻥ⁩ ⁦ہ⁩ ⁦ﯼ⁩ ⁦ں⁩  [ ]  ⁦ہ⁩ ⁦ﻮ⁩ ⁦ﺘ⁩ 
⁦ﯾ⁩  [ ] [0x0a]  ⁦ﺰ⁩ ⁦ﻫ⁩  [ ]  ⁦ﺶ⁩ ⁦ﻴ⁩ ⁦ﺸ⁩ ⁦ﻫ⁩  [ ]  ⁦ﺥ⁩ ⁦ﻭ⁩ ⁦ړ⁩ ⁦ﻝ⁩ ⁦ې⁩  [ ]  ⁦ﺶ⁩ ⁦ﻣ⁩  ⁦،⁩ [ ]  ⁦ﻪ⁩ ⁦ﻐ⁩ ⁦ﻫ⁩  
[ ]  ⁦ﻡ⁩ ⁦ﺍ⁩  [ ]  ⁦ﻦ⁩ ⁦ﻫ⁩  [ ]  ⁦ﺥ⁩ ⁦ﻭ⁩ ⁦ږ⁩ ⁦ﻮ⁩ ⁦ﻳ��
 �  [0x0a] 
-Breaks:     c   c    lc  c c    lc  c c    lc c c  c  c   lc c  c    lc  c    lc  c c c    lc  c c       c   
 c    lc   c c    lc  c    lc c c  c    lc   c  c   lc  c  c    lc c c    lc  c    lc  c c    lc  c  c    lc 
c   c    lc  c c       c   c  c    lc c  c  c  c    lc  c  c  c  c  c  c  c   lc c c  c  c    lc c c  c  c    
lc c  c    lc  c  c  c    lc c  c c       c  c c c    lc c c c c    lc c c c    lc c c c c    lc c c c    lc 
c c c    lc c c c c    lc c c c c c    lc c c c c    lc c c c c    c      c  c c    lc c c c c    lc c c c c 
c    lc c c  c   lc c c c    lc c c    lc c c    lc c c c c c       c
-Whitespace:     x          x          x               x         x        x            x          w           
 x           x        x            x            x          x         x        x          x           x        
   x          w              x                x                          x              x               x     
     x              x            w              x             x           x             x           x         
  x             x               x             x             x    w           x             x               x  
          x          x         x         x               w       w
-Sentences:  bs                                                                                   e       bs  
                                                                                                              
              e       bs                                                                                      
                                 e       bs                                                                   
                                                            e           bs                                    
                                                         e       b
-Words:      bs  be   bs    be   bs    be   bs      be b   bs    be   bs  be   bs      be   bs    be      bs  
 be   bs     be   bs  be   bs      be   bs   be b   bs     be   bs   be   bs  be   bs    be   bs     be   bs  
   be   bs    be      bs     be   bs          be   bs                 be b   bs         be   bs         be   
bs    be   bs        be   bs      be      bs     be   bs       be   bs     be   bs       be   bs     be   bs  
   be   bs       be   bs         be   bs       be   bs       be   b      bs   be   bs       be   bs         
be   bs   be b   bs     be   bs   be   bs   be   bs         be      b
-Graphemes:  b   b    b   b b    b   b b    b  b b  b  b   b  b  b    b   b    b   b b b    b   b b       b   
 b    b    b b    b   b    b  b b  b    b    b  b   b   b  b    b  b b    b   b    b   b b    b   b  b    b  
b   b    b   b b       b   b  b    b  b  b  b  b    b   b  b  b  b  b  b  b   b  b b  b  b    b  b b  b  b    
b  b  b    b   b  b  b    b  b  b b       b  b b b    b  b b b b    b  b b b    b  b b b b    b  b b b    b  
b b b    b  b b b b    b  b b b b b    b  b b b b    b  b b b b    b      b  b b    b  b b b b    b  b b b b 
b    b  b b  b   b  b b b    b  b b    b  b b    b  b b b b b       b
+Text:         ⁦म⁩ ⁦ी⁩  [ ]  ⁦क⁩ ⁦ा⁩ ⁦च⁩  [ ]  ⁦ख⁩ ⁦ा⁩ ⁦ऊ⁩  [ ]  ⁦श⁩ ⁦क⁩ ⁦त⁩ ⁦ो⁩  ⁦,⁩ [ ]  ⁦म⁩ ⁦ल⁩ ⁦ा⁩  [ ]  
⁦त⁩ ⁦े⁩  [ ]  ⁦द⁩ ⁦ु⁩ ⁦ख⁩ ⁦त⁩  [ ]  ⁦न⁩ ⁦ा⁩ ⁦ह⁩  [0x0a]  ⁦म⁩ ⁦ै⁩ ⁦ं⁩  [ ]  ⁦क⁩ ⁦ा⁩ ⁦ँ⁩ ⁦च⁩  [ ]  ⁦ख⁩ ⁦ा⁩  [ ] 
 ⁦स⁩ ⁦क⁩ ⁦त⁩ ⁦ा⁩  [ ]  ⁦ह⁩ ⁦ू⁩ ⁦ँ⁩  ⁦,⁩ [ ]  ⁦म⁩ ⁦ु⁩ ⁦झ⁩ ⁦े⁩  [ ]  ⁦उ⁩ ⁦स⁩  [ ]  ⁦स⁩ ⁦े⁩  [ ]  ⁦क⁩ ⁦ो⁩ ⁦ई⁩  [ 
]  ⁦प⁩ ⁦ी⁩ ⁦ड⁩ ⁦ा⁩  [ ]  ⁦न⁩ ⁦ह⁩ ⁦ी⁩ ⁦ं⁩  [ ]  ⁦ह⁩ ⁦ो⁩ ⁦त⁩  [0x0a]  ⁦ந⁩ ⁦ா⁩ ⁦ன⁩ ⁦்⁩  [ ]  ⁦க⁩ ⁦ண⁩ ⁦்⁩ ⁦ண⁩ ⁦ா⁩ 
⁦ட⁩ ⁦ி⁩  [ ]  ⁦ச⁩ ⁦ா⁩ ⁦ப⁩ ⁦்⁩ ⁦ப⁩ ⁦ி⁩ ⁦ட⁩ ⁦ு⁩ ⁦வ⁩ ⁦ே⁩
  ⁦ன⁩ ⁦்⁩  ⁦,⁩ [ ]  ⁦அ⁩ ⁦த⁩ ⁦ன⁩ ⁦ா⁩ ⁦ல⁩ ⁦்⁩  [ ]  ⁦எ⁩ ⁦ன⁩ ⁦க⁩ ⁦்⁩ ⁦க⁩ ⁦ு⁩  [ ]  ⁦ஒ⁩ ⁦ர⁩ ⁦ு⁩  [ ]  ⁦க⁩ ⁦ே⁩ ⁦ட⁩ 
⁦ு⁩ ⁦ம⁩ ⁦்⁩  [ ]  ⁦வ⁩ ⁦ர⁩ ⁦ா⁩ ⁦த⁩  [0x0a]  ⁦ﻢ⁩ ⁦ﯾ⁩ ⁦ں⁩  [ ]  ⁦ﮎ⁩ ⁦ﺎ⁩ ⁦ﻨ⁩ ⁦ﭼ⁩  [ ]  ⁦ﮎ⁩ ⁦ھ⁩ ⁦ﺍ⁩  [ ]  ⁦ﺲ⁩ ⁦ﮑ⁩ 
⁦ﺗ⁩ ⁦ﺍ⁩  [ ]  ⁦ہ⁩ ⁦ﻭ⁩ ⁦ں⁩  [ ]  ⁦ﺍ⁩ ⁦ﻭ⁩ ⁦ﺭ⁩  [ ]  ⁦ﻢ⁩ ⁦ﺟ⁩ ⁦ھ⁩ ⁦ے⁩  [ ]  ⁦ﺖ⁩ ⁦ﮑ⁩ ⁦ﻠ⁩ ⁦ﯿ⁩ ⁦ﻓ⁩  [ ]  ⁦ﻥ⁩ ⁦ہ⁩ ⁦ﯼ⁩ 
⁦ں⁩  [ ]  ⁦ہ⁩ ⁦ﻮ⁩ ⁦ﺘ⁩ ⁦ﯾ⁩  [ ] [0x0a]  ⁦ﺰ⁩ ⁦ﻫ⁩  [ ]  ⁦ﺶ⁩ ⁦ﻴ⁩ ⁦ﺸ⁩ ⁦ﻫ⁩  [ ]  ⁦ﺥ⁩ ⁦ﻭ⁩ ⁦ړ⁩ ⁦ﻝ⁩ ⁦ې⁩  [ ]  ⁦ﺶ⁩ ⁦ﻣ⁩  
⁦،⁩ [ ]  ⁦ﻪ⁩ ⁦ﻐ⁩ ⁦ﻫ⁩  [ ]  ⁦ﻡ⁩ ⁦ﺍ⁩  [ ]  ⁦ﻦ⁩ ⁦ﻫ⁩  [ ]  ��
 �ﺥ⁩ ⁦ﻭ⁩ ⁦ږ⁩ ⁦ﻮ⁩ ⁦ﻳ⁩  [0x0a] 
+Breaks:     c    c    lc   c c    lc   c c    lc c c   c  c   lc c   c    lc   c    lc   c c c    lc   c c   
    c      c    lc     c c    lc   c    lc c c   c    lc     c  c   lc   c   c    lc c c    lc   c    lc   c 
c    lc   c   c    lc c     c    lc   c c       c    c   c    lc c   c   c   c    lc   c   c   c   c   c   c  
c   lc c c   c   c    lc c c   c   c    lc c   c    lc   c   c   c    lc c   c c       c  c c c    lc c c c c 
   lc c c c    lc c c c c    lc c c c    lc c c c    lc c c c c    lc c c c c c    lc c c c c    lc c c c c   
 c      c  c c    lc c c c c    lc c c c c c    lc c c  c   lc c c c    lc c c    lc c c    lc c c c c c      
 c
+Whitespace:      x           x           x                x          x         x             x           w   
           x             x         x             x              x            x         x         x           
x             x             x           w                x                   x                                
x                x                 x           x                 x             w              x             x 
          x             x           x           x             x               x             x             x   
 w           x             x               x            x          x         x         x               w      
 w
+Sentences:  bs                                                                                           e   
    bs                                                                                                        
                                       e       bs                                                             
                                                                              e       bs                      
                                                                                                         e    
       bs                                                                                             e       
b
+Words:      bs   be   bs     be   bs     be   bs       be b   bs     be   bs   be   bs       be   bs     be  
    bs     be   bs       be   bs   be   bs       be   bs     be b   bs       be   bs   be   bs   be   bs     
be   bs       be   bs       be   bs     be      bs       be   bs             be   bs                       be 
b   bs           be   bs           be   bs     be   bs           be   bs       be      bs     be   bs       
be   bs     be   bs       be   bs     be   bs     be   bs       be   bs         be   bs       be   bs       
be   b      bs   be   bs       be   bs         be   bs   be b   bs     be   bs   be   bs   be   bs         be 
     b
+Graphemes:  b    b    b    b b    b    b b    b  b b   b  b   b  b   b    b    b    b    b b b    b    b b   
    b      b    b      b b    b    b    b  b b   b    b      b  b   b    b   b    b  b b    b    b    b    b 
b    b    b   b    b  b     b    b    b b       b    b   b    b  b   b   b   b    b    b   b   b   b   b   b  
b   b  b b   b   b    b  b b   b   b    b  b   b    b    b   b   b    b  b   b b       b  b b b    b  b b b b 
   b  b b b    b  b b b b    b  b b b    b  b b b    b  b b b b    b  b b b b b    b  b b b b    b  b b b b   
 b      b  b b    b  b b b b    b  b b b b b    b  b b  b   b  b b b    b  b b    b  b b    b  b b b b b      
 b
+Hyphens:       i         i i         i i         i i i           i i         i         i i i         i i     
       i i         i i i         i         i i i         i i           i i i         i         i         i i  
       i i i         i i i         i i            i i i         i i i i i i         i i i i i i i i i i i     
      i i i i i         i i i i i         i i         i i i i i         i i i            i i         i i i    
     i i         i i i         i i         i i         i i i         i i i i         i i i         i i i      
          i         i i i         i i i i         i           i i         i         i         i i i i         
 
diff --git a/tests/breaks/one.expected b/tests/breaks/one.expected
index bbae494d..cc257131 100644
--- a/tests/breaks/one.expected
+++ b/tests/breaks/one.expected
@@ -4,3 +4,4 @@ Whitespace:                  x                            x          w       w
 Sentences:  bs                                            e   bs     e       b
 Words:      bs     be bs     be   bs                   be b   bs     be      b
 Graphemes:  b  b b b  b  b b b    b  b b b      b  b b b  b   b  b b b       b
+Hyphens:       i i       i i         i i        i  i i           i i          
diff --git a/tests/breaks/ten.expected b/tests/breaks/ten.expected
index c1f8cc35..c9f91dc8 100644
--- a/tests/breaks/ten.expected
+++ b/tests/breaks/ten.expected
@@ -1,6 +1,7 @@
-Text:         ⁦i⁩ ⁦ක⁩⁦්⁩[0x200d]⁦ක⁩  [ ]  ⁦a⁩[0x200c] ⁦a⁩⁦்⁩  [0x0a] 
-Breaks:     c  c           c    lc         c  c       c
-Whitespace:                x                  w       w
-Sentences:  bs                                e       b
-Words:      bs             be   bs            be      b
-Graphemes:  b  b           b    b          b  b       b
+Text:         ⁦i⁩ ⁦ක⁩ ⁦්⁩ [0x200d] ⁦ක⁩  [ ]  ⁦a⁩ [0x200c] ⁦a⁩ ⁦்⁩  [0x0a] 
+Breaks:     c  c              c    lc          c   c       c
+Whitespace:                   x                    w       w
+Sentences:  bs                                     e       b
+Words:      bs                be   bs              be      b
+Graphemes:  b  b              b    b           b   b       b
+Hyphens:       i i i        i         i        i i          
diff --git a/tests/breaks/three.expected b/tests/breaks/three.expected
index 7f078f4f..c2c89158 100644
--- a/tests/breaks/three.expected
+++ b/tests/breaks/three.expected
@@ -1,6 +1,7 @@
-Text:         ⁦o⁩ ⁦n⁩ ⁦e⁩  [ ]  ⁦t⁩ ⁦w⁩ ⁦o⁩  [0x2028]  ⁦r⁩ ⁦e⁩ ⁦d⁩  [ ]  ⁦b⁩ ⁦l⁩ ⁦u⁩ ⁦e⁩[0x200d] ⁦g⁩ ⁦r⁩ ⁦e⁩ 
⁦e⁩ ⁦n⁩  [0x0a] 
-Breaks:     c  c c c    lc c c c         Lc c c c    lc c c c         c c c c c c       c
-Whitespace:        x           w                x                               w       w
-Sentences:  bs                 e         bs                                     e       b
-Words:      bs     be   bs     be        bs     be   bs                         be      b
-Graphemes:  b  b b b    b  b b b         b  b b b    b  b b b         b b b b b b       b
+Text:         ⁦o⁩ ⁦n⁩ ⁦e⁩  [ ]  ⁦t⁩ ⁦w⁩ ⁦o⁩  [0x2028]  ⁦r⁩ ⁦e⁩ ⁦d⁩  [ ]  ⁦b⁩ ⁦l⁩ ⁦u⁩ ⁦e⁩ [0x200d] ⁦g⁩ ⁦r⁩ 
⁦e⁩ ⁦e⁩ ⁦n⁩  [0x0a] 
+Breaks:     c  c c c    lc c c c         Lc c c c    lc c c c          c c c c c c       c
+Whitespace:        x           w                x                                w       w
+Sentences:  bs                 e         bs                                      e       b
+Words:      bs     be   bs     be        bs     be   bs                          be      b
+Graphemes:  b  b b b    b  b b b         b  b b b    b  b b b          b b b b b b       b
+Hyphens:       i i         i i              i i         i i i i        i i i i i          
diff --git a/tests/breaks/two.expected b/tests/breaks/two.expected
index 3ec2d948..0280c52f 100644
--- a/tests/breaks/two.expected
+++ b/tests/breaks/two.expected
@@ -4,3 +4,4 @@ Whitespace:                    w       w
 Sentences:  bs                 e       b
 Words:      bs         e s     be      b
 Graphemes:  b  b b b b b b b b b       b
+Hyphens:       i i i i   i i i          
diff --git a/tests/test-break.c b/tests/test-break.c
index 3fb5cdcd..f7fcf6ec 100644
--- a/tests/test-break.c
+++ b/tests/test-break.c
@@ -46,7 +46,7 @@ test_file (const gchar *filename, GString *string)
   int len2;
   char *p;
   int i;
-  GString *s1, *s2, *s3, *s4, *s5;
+  GString *s1, *s2, *s3, *s4, *s5, *s6;
   int m;
   char *test;
   char *text;
@@ -109,6 +109,7 @@ test_file (const gchar *filename, GString *string)
   s3 = g_string_new ("Sentences:");
   s4 = g_string_new ("Words:");
   s5 = g_string_new ("Graphemes:");
+  s6 = g_string_new ("Hyphens:");
 
   g_string_append (string, "Text: ");
 
@@ -119,6 +120,7 @@ test_file (const gchar *filename, GString *string)
   g_string_append_printf (s3, "%*s", (int)(m - s3->len), "");
   g_string_append_printf (s4, "%*s", (int)(m - s4->len), "");
   g_string_append_printf (s5, "%*s", (int)(m - s5->len), "");
+  g_string_append_printf (s6, "%*s", (int)(m - s6->len), "");
   g_string_append_printf (string, "%*s", (int)(m - strlen ("Text: ")), "");
 
   for (i = 0, p = text; i < len; i++, p = g_utf8_next_char (p))
@@ -129,6 +131,7 @@ test_file (const gchar *filename, GString *string)
       int o = 0;
       int s = 0;
       int g = 0;
+      int h = 0;
 
       if (log.is_mandatory_break)
         {
@@ -195,7 +198,18 @@ test_file (const gchar *filename, GString *string)
           g++;
         }
 
-      m = MAX (MAX (MAX (b, w), MAX (o, s)), g);
+      if (log.break_removes_preceding)
+        {
+          g_string_append (s6, "r");
+          h++;
+        }
+      if (log.break_inserts_hyphen)
+        {
+          g_string_append (s6, "i");
+          h++;
+        }
+
+      m = MAX (MAX (MAX (b, w), MAX (o, s)), MAX (g, h));
 
       g_string_append_printf (string, "%*s", m, "");
       g_string_append_printf (s1, "%*s", m - b, "");
@@ -203,6 +217,7 @@ test_file (const gchar *filename, GString *string)
       g_string_append_printf (s3, "%*s", m - s, "");
       g_string_append_printf (s4, "%*s", m - o, "");
       g_string_append_printf (s5, "%*s", m - g, "");
+      g_string_append_printf (s6, "%*s", m - h, "");
 
       if (i < len - 1)
         {
@@ -215,6 +230,7 @@ test_file (const gchar *filename, GString *string)
               g_string_append (s3, "   ");
               g_string_append (s4, "   ");
               g_string_append (s5, "   ");
+              g_string_append (s6, "   ");
             }
           else if (g_unichar_isgraph (ch) &&
                    !(g_unichar_type (ch) == G_UNICODE_LINE_SEPARATOR ||
@@ -228,6 +244,7 @@ test_file (const gchar *filename, GString *string)
               g_string_append (s3, " ");
               g_string_append (s4, " ");
               g_string_append (s5, " ");
+              g_string_append (s6, " ");
             }
           else
             {
@@ -238,6 +255,7 @@ test_file (const gchar *filename, GString *string)
               g_string_append_printf (s3, "%*s", (int)strlen (str), "");
               g_string_append_printf (s4, "%*s", (int)strlen (str), "");
               g_string_append_printf (s5, "%*s", (int)strlen (str), "");
+              g_string_append_printf (s6, "%*s", (int)strlen (str), "");
               g_free (str);
             }
         }
@@ -253,12 +271,15 @@ test_file (const gchar *filename, GString *string)
   g_string_append (string, "\n");
   g_string_append_len (string, s5->str, s5->len);
   g_string_append (string, "\n");
+  g_string_append_len (string, s6->str, s6->len);
+  g_string_append (string, "\n");
 
   g_string_free (s1, TRUE);
   g_string_free (s2, TRUE);
   g_string_free (s3, TRUE);
   g_string_free (s4, TRUE);
   g_string_free (s5, TRUE);
+  g_string_free (s6, TRUE);
 
   g_object_unref (layout);
   g_free (attrs);
@@ -366,9 +387,9 @@ main (int argc, char *argv[])
                    " l - line break          s - word start\n"
                    " c - char break          e - word end\n"
                    "\n"
-                   "Whitespace:             Sentences:\n"
-                   " x - expandable space    b - sentence boundary\n"
-                   " w - whitespace          s - sentence start\n"
+                   "Whitespace:             Sentences:\n            Hyphens"
+                   " x - expandable space    b - sentence boundary   i - insert hyphen\n"
+                   " w - whitespace          s - sentence start      r - remove preceding\n"
                    "                         e - sentence end\n");
           return 0;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]