summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-01-14 10:17:47 +0000
committerTom Hacohen <tom@stosb.com>2015-01-14 10:17:47 +0000
commit6e845627e940c49b487e8495b1c8e4bc5cd5ae08 (patch)
treebfc94b54fd66b0995f0d12ac7c830e9633908f6d
parent19ad25f5ca76b1e7746045c125dc5e2512dacdaf (diff)
downloadefl-devs/tasn/tb2.tar.gz
Some testing stuff.devs/tasn/tb2
-rw-r--r--src/lib/evas/canvas/evas_textblock2.c1
-rw-r--r--src/tests/evas/evas_test_textblock2.c22
2 files changed, 16 insertions, 7 deletions
diff --git a/src/lib/evas/canvas/evas_textblock2.c b/src/lib/evas/canvas/evas_textblock2.c
index 70730159f4..9cb7b8f604 100644
--- a/src/lib/evas/canvas/evas_textblock2.c
+++ b/src/lib/evas/canvas/evas_textblock2.c
@@ -2372,6 +2372,7 @@ _layout_par(Ctxt *c)
}
}
+ printf("%d\n", break_position);
if (break_position > 0)
{
/* Add all the items that don't need breaking. */
diff --git a/src/tests/evas/evas_test_textblock2.c b/src/tests/evas/evas_test_textblock2.c
index 359b368455..86bee8adb1 100644
--- a/src/tests/evas/evas_test_textblock2.c
+++ b/src/tests/evas/evas_test_textblock2.c
@@ -302,9 +302,8 @@ START_TEST(evas_textblock2_cursor)
/* Walk the textblock2 using cursor_char_next */
eo_do(tb, efl_text_set(buf));
- printf("%s\n", eo_do(tb, efl_text_get()));
ck_assert_str_eq(eo_do(tb, efl_text_get()), buf);
- len = eina_unicode_utf8_get_len(buf) - 12; /* 12 because len(\n) == 1 and len(" _PS ") == 1 */
+ len = eina_unicode_utf8_get_len(buf);
for (i = 0 ; i < len ; i++)
{
_CHECK_CURSOR_COORDS();
@@ -610,11 +609,11 @@ START_TEST(evas_textblock2_cursor)
#ifdef HAVE_FRIBIDI
eo_do(tb, efl_text_set(
- "testנסיוןtestנסיון" _PS ""
- "נסיוןtestנסיוןtest" _PS ""
- "testנסיוןtest" _PS ""
- "נסיוןtestנסיון" _PS ""
- "testנסיון\nנסיון" _PS ""
+ "testנסיוןtestנסיון" _PS
+ "נסיוןtestנסיוןtest" _PS
+ "testנסיוןtest" _PS
+ "נסיוןtestנסיון" _PS
+ "testנסיון\nנסיון" _PS
"נסיוןtest\ntest"
));
@@ -647,10 +646,19 @@ START_TEST(evas_textblock2_cursor)
evas_textblock2_cursor_pos_set(main_cur, 7);
evas_textblock2_cursor_char_coord_set(main_cur, x - 50, y);
fail_if(evas_textblock2_cursor_compare(main_cur, cur));
+ printf("TOM2 %d %d\n",
+ evas_textblock2_cursor_pos_get(main_cur),
+ evas_textblock2_cursor_pos_get(cur)
+ );
evas_textblock2_cursor_line_char_first(cur);
evas_textblock2_cursor_pos_set(main_cur, 7);
evas_textblock2_cursor_char_coord_set(main_cur, x + w + 50, y);
+ printf("TOM3 %d %d\n",
+ evas_textblock2_cursor_pos_get(main_cur),
+ evas_textblock2_cursor_pos_get(cur)
+ );
+ printf("***\n");
fail_if(evas_textblock2_cursor_compare(main_cur, cur));
break;
}