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)
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)
2372 } 2372 }
2373 } 2373 }
2374 2374
2375 printf("%d\n", break_position);
2375 if (break_position > 0) 2376 if (break_position > 0)
2376 { 2377 {
2377 /* Add all the items that don't need breaking. */ 2378 /* 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)
302 302
303 /* Walk the textblock2 using cursor_char_next */ 303 /* Walk the textblock2 using cursor_char_next */
304 eo_do(tb, efl_text_set(buf)); 304 eo_do(tb, efl_text_set(buf));
305 printf("%s\n", eo_do(tb, efl_text_get()));
306 ck_assert_str_eq(eo_do(tb, efl_text_get()), buf); 305 ck_assert_str_eq(eo_do(tb, efl_text_get()), buf);
307 len = eina_unicode_utf8_get_len(buf) - 12; /* 12 because len(\n) == 1 and len(" _PS ") == 1 */ 306 len = eina_unicode_utf8_get_len(buf);
308 for (i = 0 ; i < len ; i++) 307 for (i = 0 ; i < len ; i++)
309 { 308 {
310 _CHECK_CURSOR_COORDS(); 309 _CHECK_CURSOR_COORDS();
@@ -610,11 +609,11 @@ START_TEST(evas_textblock2_cursor)
610 609
611#ifdef HAVE_FRIBIDI 610#ifdef HAVE_FRIBIDI
612 eo_do(tb, efl_text_set( 611 eo_do(tb, efl_text_set(
613 "testנסיוןtestנסיון" _PS "" 612 "testנסיוןtestנסיון" _PS
614 "נסיוןtestנסיוןtest" _PS "" 613 "נסיוןtestנסיוןtest" _PS
615 "testנסיוןtest" _PS "" 614 "testנסיוןtest" _PS
616 "נסיוןtestנסיון" _PS "" 615 "נסיוןtestנסיון" _PS
617 "testנסיון\nנסיון" _PS "" 616 "testנסיון\nנסיון" _PS
618 "נסיוןtest\ntest" 617 "נסיוןtest\ntest"
619 )); 618 ));
620 619
@@ -647,10 +646,19 @@ START_TEST(evas_textblock2_cursor)
647 evas_textblock2_cursor_pos_set(main_cur, 7); 646 evas_textblock2_cursor_pos_set(main_cur, 7);
648 evas_textblock2_cursor_char_coord_set(main_cur, x - 50, y); 647 evas_textblock2_cursor_char_coord_set(main_cur, x - 50, y);
649 fail_if(evas_textblock2_cursor_compare(main_cur, cur)); 648 fail_if(evas_textblock2_cursor_compare(main_cur, cur));
649 printf("TOM2 %d %d\n",
650 evas_textblock2_cursor_pos_get(main_cur),
651 evas_textblock2_cursor_pos_get(cur)
652 );
650 653
651 evas_textblock2_cursor_line_char_first(cur); 654 evas_textblock2_cursor_line_char_first(cur);
652 evas_textblock2_cursor_pos_set(main_cur, 7); 655 evas_textblock2_cursor_pos_set(main_cur, 7);
653 evas_textblock2_cursor_char_coord_set(main_cur, x + w + 50, y); 656 evas_textblock2_cursor_char_coord_set(main_cur, x + w + 50, y);
657 printf("TOM3 %d %d\n",
658 evas_textblock2_cursor_pos_get(main_cur),
659 evas_textblock2_cursor_pos_get(cur)
660 );
661 printf("***\n");
654 fail_if(evas_textblock2_cursor_compare(main_cur, cur)); 662 fail_if(evas_textblock2_cursor_compare(main_cur, cur));
655 break; 663 break;
656 } 664 }