Evas tests: Adedd a textblock test for the last bug fix.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 24 Jul 2011 08:50:46 +0000 (08:50 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 24 Jul 2011 08:50:46 +0000 (08:50 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@61639 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c
src/tests/evas_test_textblock.c

index a74a818..e1f0c5e 100644 (file)
@@ -9060,6 +9060,12 @@ _evas_textblock_check_item_node_link(Evas_Object *obj)
      }
    return EINA_TRUE;
 }
+
+EAPI int
+_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n)
+{
+   return n->offset;
+}
 #endif
 
 #if 0
index ea7f806..6f6b13b 100644 (file)
@@ -14,6 +14,8 @@
 /* Functions defined in evas_object_textblock.c */
 EAPI Eina_Bool
 _evas_textblock_check_item_node_link(Evas_Object *obj);
+EAPI int
+_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n);
 /* end of functions defined in evas_object_textblock.c */
 
 
@@ -759,6 +761,14 @@ START_TEST(evas_textblock_format_removal)
    fnode = evas_textblock_node_format_first_get(tb);
    fail_if (fnode);
 
+   /* Verify fmt position and REP_CHAR positions are the same */
+   evas_object_textblock_text_markup_set(tb,
+         "This is<ps>an <item absize=93x152 vsize=ascent></>a.");
+   evas_textblock_cursor_pos_set(cur, 7);
+   evas_textblock_cursor_char_delete(cur);
+   fnode = evas_textblock_node_format_first_get(tb);
+   fail_if(_evas_textblock_format_offset_get(fnode) != 10);
+
    END_TB_TEST();
 }
 END_TEST