summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2013-11-19 15:47:06 +0000
committerTom Hacohen <tom@stosb.com>2013-11-19 16:08:18 +0000
commit15ac9d35a9baf9e7d42c01fd40ac86f959d6e0fd (patch)
tree35366139f5264442233ee61f0b586438e867c91c
parent3c508a28e336355b1d711be3815ccc6b6db9e039 (diff)
Evas textblock tests: Added a complex markup set/get test.
This should make things more robust as thing tests a lot.
-rw-r--r--src/tests/evas_test_textblock.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/tests/evas_test_textblock.c b/src/tests/evas_test_textblock.c
index ab74a685..2e5a6bbb 100644
--- a/src/tests/evas_test_textblock.c
+++ b/src/tests/evas_test_textblock.c
@@ -1766,6 +1766,41 @@ START_TEST(evas_textblock_text_getters)
1766 free(tmp); 1766 free(tmp);
1767 } 1767 }
1768 1768
1769 /* complex markup set/get */
1770 {
1771 const char *text =
1772 "This is an entry widget in this window that<ps/>"
1773 "uses markup <b>like this</> for styling and<ps/>"
1774 "formatting <em>like this</>, as well as<ps/>"
1775 "<a href=X><link>links in the text</></a>, so enter text<ps/>"
1776 "in here to edit it. By the way, links are<ps/>"
1777 "called <a href=anc-02>Anchors</a> so you will need<ps/>"
1778 "to refer to them this way.<ps/>"
1779 "<ps/>"
1780
1781 "Also you can stick in items with (relsize + ascent): "
1782 "<item relsize=16x16 vsize=ascent href=emoticon/evil-laugh></item>"
1783 " (full) "
1784 "<item relsize=16x16 vsize=full href=emoticon/guilty-smile></item>"
1785 " (to the left)<ps/>"
1786
1787 "Also (size + ascent): "
1788 "<item size=16x16 vsize=ascent href=emoticon/haha></item>"
1789 " (full) "
1790 "<item size=16x16 vsize=full href=emoticon/happy-panting></item>"
1791 " (before this)<ps/>"
1792
1793 "And as well (absize + ascent): "
1794 "<item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item>"
1795 " (full) "
1796 "<item absize=64x64 vsize=full href=emoticon/not-impressed></item>"
1797 " or even paths to image files on disk too like: "
1798 "<item absize=96x128 vsize=full href=file://bla/images/sky_01.jpg></item>"
1799 " ... end.";
1800 evas_object_textblock_text_markup_set(tb, text);
1801 ck_assert_str_eq(text, evas_object_textblock_text_markup_get(tb));
1802 }
1803
1769 END_TB_TEST(); 1804 END_TB_TEST();
1770} 1805}
1771END_TEST 1806END_TEST