3 #include "testtextlib.h"
5 static AtkAttributeSet *attrib = NULL;
6 static char result_string[2][6] = {"FALSE", "TRUE"};
11 * @test: The callback to be run when the "Run Tests" button
12 * in the GUI is clicked.
14 * Sets up the GUI windows.
16 * Returns: the window number, or -1 if failure.
18 gint setup_gui(AtkObject *obj, TLruntest test)
20 gchar *paramnames[MAX_PARAMS];
21 gchar *defaults[MAX_PARAMS];
22 static OutputWindow *tow = NULL;
26 window = create_windows(obj, test, &tow);
28 window = create_windows(obj, test, &tow);
33 /* Get Text [at|after|before] Offset Tests */
34 paramnames[0] = "offset";
36 add_test(window, "atk_text_get_text_after_offset", 1, paramnames, defaults);
37 add_test(window, "atk_text_get_text_before_offset", 1, paramnames, defaults);
38 add_test(window, "atk_text_get_text_at_offset",1 , paramnames, defaults);
40 /* Get Character Count Test */
41 add_test(window, "atk_text_get_character_count", 0, NULL, NULL);
43 /* Get Character At Offset Test */
44 paramnames[0] = "offset";
46 add_test(window, "atk_text_get_character_at_offset", 1, paramnames, defaults);
49 paramnames[0] = "position 1";
50 paramnames[1] = "position 2";
53 add_test(window, "atk_text_get_text", 2, paramnames, defaults);
56 add_test(window, "atk_text_get_caret_offset", 0, NULL, NULL);
58 paramnames[0] = "offset";
60 add_test(window, "atk_text_set_caret_offset", 1, paramnames, defaults);
63 add_test(window, "atk_text_get_n_selections", 0, NULL, NULL);
65 paramnames[0] = "selection no";
67 add_test(window, "atk_text_get_selection", 1, paramnames, defaults);
69 paramnames[0] = "start";
70 paramnames[1] = "end";
73 add_test(window, "atk_text_add_selection", 2, paramnames, defaults);
75 paramnames[0] = "selection no";
76 paramnames[1] = "start";
77 paramnames[2] = "end";
81 add_test(window, "atk_text_set_selection", 3, paramnames, defaults);
83 paramnames[0] = "selection no";
85 add_test(window, "atk_text_remove_selection", 1, paramnames, defaults);
87 paramnames[0] = "offset";
89 add_test(window, "atk_text_get_run_attributes", 1, paramnames, defaults);
91 add_test(window, "atk_text_get_default_attributes", 0, paramnames, defaults);
93 paramnames[0] = "offset";
94 paramnames[1] = "coord mode";
96 defaults[1] = "ATK_XY_SCREEN";
97 add_test(window, "atk_text_get_character_extents", 2, paramnames, defaults);
101 paramnames[2] = "coord mode";
104 defaults[2] = "ATK_XY_SCREEN";
105 add_test(window, "atk_text_get_offset_at_point", 3, paramnames, defaults);
107 /* Editable Text Tests */
108 if (ATK_IS_EDITABLE_TEXT(obj))
111 paramnames[0] = "start";
112 paramnames[1] = "end";
115 add_test(window, "atk_editable_text_set_run_attributes", 2, paramnames, defaults);
117 paramnames[0] = "start";
118 paramnames[1] = "end";
121 add_test(window, "atk_editable_text_cut_text", 2, paramnames, defaults);
123 paramnames[0] = "position";
125 add_test(window, "atk_editable_text_paste_text", 1, paramnames, defaults);
127 paramnames[0] = "start";
128 paramnames[1] = "end";
131 add_test(window, "atk_editable_text_delete_text", 2, paramnames, defaults);
132 paramnames[0] = "start";
133 paramnames[1] = "end";
136 add_test(window, "atk_editable_text_copy_text", 2, paramnames, defaults);
138 paramnames[0] = "insert text";
139 paramnames[1] = "position";
140 defaults[0] = "this is my insert";
142 add_test(window, "atk_editable_text_insert_text", 2, paramnames, defaults);
149 * @obj: An #AtkObject
151 * Sets up text signal handlers.
154 void add_handlers(AtkObject *obj)
156 if (!already_accessed_atk_object(obj))
158 /* Set up signal handlers */
160 g_print ("Adding signal handler\n");
161 g_signal_connect_closure_by_id (obj,
162 g_signal_lookup ("text_caret_moved", G_OBJECT_TYPE (obj)),
164 g_cclosure_new (G_CALLBACK (_notify_caret_handler),
168 g_signal_connect_closure (obj, "text_changed::insert",
169 g_cclosure_new (G_CALLBACK (_notify_text_insert_handler),
173 g_signal_connect_closure (obj, "text_changed::delete",
174 g_cclosure_new (G_CALLBACK (_notify_text_delete_handler),
181 * notify_text_insert_handler:
183 * @start_offset: Start offset of insert
184 * @end_offset: End offset of insert.
186 * Text inserted singal handler
189 _notify_text_insert_handler (GObject *obj, int start_offset, int end_offset)
191 g_print ("SIGNAL - Text inserted at position %d, length %d!\n",
192 start_offset, end_offset);
196 * notify_text_delete_handler:
198 * @start_offset: Start offset of delete
199 * @end_offset: End offset of delete.
201 * Text deleted singal handler
204 _notify_text_delete_handler (GObject *obj, int start_offset, int end_offset)
206 g_print ("SIGNAL - Text deleted at position %d, length %d!\n",
207 start_offset, end_offset);
211 * notify_caret_handler:
213 * @position: Caret position
215 * Caret (cursor) moved signal handler.
218 _notify_caret_handler (GObject *obj, int position)
220 g_print ("SIGNAL - The caret moved to position %d!\n", position);
225 * @obj: An #AtkObject
226 * @win_val: The window number
228 * The callback to run when the "Run Tests" button on the
229 * Test GUI is clicked.
232 runtest(AtkObject *obj, gint win_val)
236 gchar output[MAX_LINE_SIZE];
239 testsOn = tests_set(win_val, &size);
241 for(i = 0; i < size; i++)
243 gint param_int1, param_int2, start, end, j, x, y, height, width;
244 gchar *param_string1, *param_string2, *param_string3, *text;
248 if (strcmp(testsOn[i], "atk_text_get_text_at_offset") == 0)
250 param_string1 = get_arg_of_func(win_val, "atk_text_get_text_at_offset", "offset");
251 param_int1 = string_to_int(param_string1);
253 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_WORD_END);
254 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_WORD_START);
255 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_LINE_END);
256 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_LINE_START);
257 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_END);
258 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_START);
259 _run_offset_test(obj, "at", param_int1, ATK_TEXT_BOUNDARY_CHAR);
262 if (strcmp(testsOn[i], "atk_text_get_text_after_offset") == 0)
264 param_string1 = get_arg_of_func(win_val, "atk_text_get_text_after_offset", "offset");
265 param_int1 = string_to_int(param_string1);
267 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_WORD_END);
268 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_WORD_START);
269 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_LINE_END);
270 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_LINE_START);
271 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_END);
272 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_START);
273 _run_offset_test(obj, "after", param_int1, ATK_TEXT_BOUNDARY_CHAR);
276 if (strcmp(testsOn[i], "atk_text_get_text_before_offset") == 0)
278 param_string1 = get_arg_of_func(win_val, "atk_text_get_text_before_offset", "offset");
279 param_int1 = string_to_int(param_string1);
281 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_WORD_END);
282 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_WORD_START);
283 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_LINE_END);
284 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_LINE_START);
285 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_END);
286 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_SENTENCE_START);
287 _run_offset_test(obj, "before", param_int1, ATK_TEXT_BOUNDARY_CHAR);
290 if (strcmp(testsOn[i], "atk_text_get_character_count") == 0)
292 param_int1 = atk_text_get_character_count (ATK_TEXT (obj));
293 sprintf(output, "\nText character count: %d\n", param_int1);
294 set_output_buffer(output);
297 if (strcmp(testsOn[i], "atk_text_get_character_at_offset") == 0)
299 param_string1 = get_arg_of_func(win_val, "atk_text_get_character_at_offset",
301 uni_char = atk_text_get_character_at_offset (ATK_TEXT(obj),
302 string_to_int(param_string1));
303 sprintf(output, "\nCharacter at offset %d: |%x|\n",
304 string_to_int(param_string1), uni_char);
305 set_output_buffer(output);
308 if (strcmp(testsOn[i], "atk_text_get_text") == 0)
310 param_string1 = get_arg_of_func(win_val, "atk_text_get_text", "position 1");
311 param_string2 = get_arg_of_func(win_val, "atk_text_get_text", "position 2");
312 text = atk_text_get_text (ATK_TEXT (obj), string_to_int(param_string1),
313 string_to_int(param_string2));
314 sprintf(output, "\nText %d, %d: %s\n", string_to_int(param_string1),
315 string_to_int(param_string2), text);
317 set_output_buffer(output);
320 if (strcmp(testsOn[i], "atk_text_get_caret_offset") == 0)
322 param_int1 = atk_text_get_caret_offset (ATK_TEXT (obj));
323 if (param_int1 == -1)
324 sprintf(output, "\nCaret offset: |Not Supported|\n");
326 sprintf(output, "\nCaret offset: %d\n", param_int1);
327 set_output_buffer(output);
330 if (strcmp(testsOn[i], "atk_text_set_caret_offset") == 0)
332 param_string1 = get_arg_of_func(win_val, "atk_text_set_caret_offset", "offset");
333 atk_text_set_caret_offset(ATK_TEXT(obj), string_to_int(param_string1));
334 sprintf(output, "\nPutting caret at offset: |%d|\n",
335 string_to_int(param_string1));
336 param_int1 = atk_text_get_caret_offset (ATK_TEXT (obj));
338 if (param_int1 == -1)
339 sprintf(output, "\nCaret offset: |Not Supported|\n");
341 sprintf(output, "\nCaret offset was set at: |%d|\n", param_int1);
343 set_output_buffer(output);
346 if (strcmp(testsOn[i], "atk_text_get_n_selections") == 0)
348 param_int1 = atk_text_get_n_selections(ATK_TEXT(obj));
349 if (param_int1 == -1)
351 sprintf(output, "\nNo selected regions\n");
352 set_output_buffer(output);
355 for (j = 0; j < param_int1; j++)
357 sprintf(output, "\nNumber of selected text regions is: |%d|\n", j);
358 set_output_buffer(output);
360 text = atk_text_get_selection(ATK_TEXT(obj), j, &start, &end);
363 sprintf(output, "\nSelected text for region %d is: |%s|\n", j, text);
364 set_output_buffer(output);
366 "\nStart selection bounds: %d\tEnd selection bounds: %d\n",
371 sprintf(output, "\nNo selected region %d\n", j);
374 set_output_buffer(output);
378 if (strcmp(testsOn[i], "atk_text_add_selection") == 0)
380 param_string1 = get_arg_of_func(win_val, "atk_text_add_selection", "start");
381 param_string2 = get_arg_of_func(win_val, "atk_text_add_selection", "end");
382 result = atk_text_add_selection(ATK_TEXT(obj),
383 string_to_int(param_string1), string_to_int(param_string2));
384 sprintf(output, "\nSet selection bounds between %d, and %d: %s",
385 string_to_int(param_string1), string_to_int(param_string2),
386 result_string[result]);
387 set_output_buffer(output);
389 param_int1 = atk_text_get_n_selections(ATK_TEXT(obj));
390 for (j = 0; j < param_int1; j++)
392 sprintf(output, "\nNumber of selected text region is: %d\n", j);
393 set_output_buffer(output);
394 text = atk_text_get_selection(ATK_TEXT(obj), j, &start, &end);
398 sprintf(output, "\nSelected text for region %d is: |%s|\n", j, text);
399 set_output_buffer(output);
401 "\nStart selection bounds: %d\tEnd selection bounds: %d\n",
406 sprintf(output, "\nNo selected region %d\n", j);
409 set_output_buffer(output);
413 if (strcmp(testsOn[i], "atk_text_get_selection") == 0)
415 param_string1 = get_arg_of_func(win_val, "atk_text_get_selection", "selection no");
416 text = atk_text_get_selection(ATK_TEXT(obj),
417 string_to_int(param_string1), &start, &end);
421 sprintf(output, "\nSelected text for region %d is: |%s|\n",
422 string_to_int(param_string1), text);
423 set_output_buffer(output);
425 "\nStart selection bounds: %d\t End selection bounds: %d\n",
430 sprintf(output, "\nNo selected region %d\n", string_to_int(param_string1));
433 set_output_buffer(output);
436 if (strcmp(testsOn[i], "atk_text_set_selection") == 0)
438 param_string1 = get_arg_of_func(win_val, "atk_text_set_selection", "selection no");
439 param_string2 = get_arg_of_func(win_val, "atk_text_set_selection", "start");
440 param_string3 = get_arg_of_func(win_val, "atk_text_set_selection", "end");
441 result = atk_text_set_selection(ATK_TEXT(obj), string_to_int(param_string1),
442 string_to_int(param_string2), string_to_int(param_string3));
443 sprintf(output, "Set selection %d's bounds between %d and %d: %s\n",
444 string_to_int(param_string1), string_to_int(param_string2),
445 string_to_int(param_string3), result_string[result]);
446 set_output_buffer(output);
447 text = atk_text_get_selection(ATK_TEXT(obj), string_to_int(param_string1),
452 sprintf(output, "Selected text for the reset region %d is: |%s|\n",
453 string_to_int(param_string1), text);
454 set_output_buffer(output);
456 "\nNew start selection bounds: %d\tNew end selection bounds: %d\n",
461 sprintf(output, "\nNo selected region %d\n", string_to_int(param_string1));
464 set_output_buffer(output);
467 if (strcmp(testsOn[i], "atk_text_remove_selection") == 0)
469 param_string1 = get_arg_of_func(win_val, "atk_text_remove_selection", "selection no");
470 result = atk_text_remove_selection(ATK_TEXT(obj), string_to_int(param_string1));
471 sprintf(output, "Remove selection for region %d: %s\n",
472 string_to_int(param_string1), result_string[result]);
473 set_output_buffer(output);
474 text = atk_text_get_selection(ATK_TEXT(obj),
475 string_to_int(param_string1), &start, &end);
478 sprintf(output, "\nRemoved regions text should be empty instead of: %s", text);
480 sprintf(output, "\nRemoved regions text should be empty, this is: ||");
482 set_output_buffer(output);
485 if (strcmp(testsOn[i], "atk_text_get_run_attributes") == 0)
488 param_string1 = get_arg_of_func(win_val, "atk_text_get_run_attributes", "offset");
489 test_int = string_to_int(param_string1);
490 attrib = atk_text_get_run_attributes(ATK_TEXT(obj), test_int, &start, &end);
491 sprintf(output, "get_run_attributes at offset %i:\nStart: %i, End: %i\n", test_int,
493 set_output_buffer(output);
494 if (attrib != NULL) {
500 AtkAttribute* att = node->data;
502 sprintf(output, "List index: %i, Name: %s, Value: %s\n", index,
503 att->name, att->value);
504 set_output_buffer(output);
508 atk_attribute_set_free (attrib);
512 if (strcmp(testsOn[i], "atk_text_get_default_attributes") == 0)
514 attrib = atk_text_get_default_attributes(ATK_TEXT(obj));
515 sprintf(output, "get_default_attributes\n");
516 set_output_buffer(output);
517 if (attrib != NULL) {
523 AtkAttribute* att = node->data;
525 sprintf(output, "List index: %i, Name: %s, Value: %s\n", index,
526 att->name, att->value);
527 set_output_buffer(output);
531 atk_attribute_set_free (attrib);
535 if (strcmp(testsOn[i], "atk_text_get_character_extents") == 0)
538 param_string1 = get_arg_of_func(win_val, "atk_text_get_character_extents",
540 param_string2 = get_arg_of_func(win_val, "atk_text_get_character_extents",
542 test_int = string_to_int(param_string1);
543 if (strcmp(param_string2, "ATK_XY_SCREEN") == 0)
545 atk_text_get_character_extents(ATK_TEXT(obj), test_int, &x, &y, &width,
546 &height, ATK_XY_SCREEN);
548 "get_character_extents at offset %i, mode: SCREEN\nX: %i, Y: %i, width: %i, height: %i\n",
549 test_int, x, y, width, height);
551 else if (strcmp(param_string2, "ATK_XY_WINDOW") == 0)
553 atk_text_get_character_extents(ATK_TEXT(obj), test_int, &x, &y, &width,
554 &height, ATK_XY_WINDOW);
556 "get_character_extents at offset %i, mode: WIDGET_WINDOW\nX: %i, Y: %i, width: %i, height: %i\n",
557 test_int, x, y, width, height);
560 sprintf(output, "get_character_extents_at_offset: Invalid coord mode argument!");
562 set_output_buffer(output);
565 if (strcmp(testsOn[i], "atk_text_get_offset_at_point") == 0)
568 param_string1 = get_arg_of_func(win_val, "atk_text_get_offset_at_point", "x");
569 param_string2 = get_arg_of_func(win_val, "atk_text_get_offset_at_point", "y");
570 param_string3 = get_arg_of_func(win_val, "atk_text_get_offset_at_point", "coord mode");
571 param_int1 = string_to_int(param_string1);
572 param_int2 = string_to_int(param_string2);
573 if (strcmp(param_string3, "ATK_XY_SCREEN") == 0)
575 test_int = atk_text_get_offset_at_point(ATK_TEXT(obj), param_int1, param_int2,
578 sprintf(output, "get_offset_at_point %i,%i mode: SCREEN is %i\n", param_int1, param_int2, test_int);
580 sprintf(output, "Cannot get_offset_at_point\n");
582 else if (strcmp(param_string3, "ATK_XY_WINDOW") == 0)
584 test_int = atk_text_get_offset_at_point(ATK_TEXT(obj), param_int1, param_int2,
587 sprintf(output, "get_offset_at_point %i,%i mode: WIDGET_WINDOW is %i\n", param_int1, param_int2, test_int);
589 sprintf(output, "Cannot get_offset_at_point\n");
592 sprintf(output, "get_offset_at_point: Invalid coord mode argument!");
594 set_output_buffer(output);
596 if (ATK_IS_EDITABLE_TEXT(obj))
598 if (strcmp(testsOn[i], "atk_editable_text_set_run_attributes") == 0)
600 param_string1 = get_arg_of_func(win_val,
601 "atk_editable_text_set_run_attributes", "start");
602 param_string2 = get_arg_of_func(win_val,
603 "atk_editable_text_set_run_attributes", "end");
604 result = atk_editable_text_set_run_attributes(ATK_EDITABLE_TEXT(obj),
605 attrib, string_to_int(param_string1), string_to_int(param_string2));
607 sprintf(output, "\nSetting attributes in range %d to %d...OK\n",
608 string_to_int(param_string1), string_to_int(param_string2));
610 sprintf(output, "\nSetting attributes in range %d to %d...Failed\n",
611 string_to_int(param_string1), string_to_int(param_string2));
612 set_output_buffer(output);
615 if (strcmp(testsOn[i], "atk_editable_text_cut_text") == 0)
617 param_string1 = get_arg_of_func(win_val, "atk_editable_text_cut_text", "start");
618 param_string2 = get_arg_of_func(win_val, "atk_editable_text_cut_text", "end");
619 atk_editable_text_cut_text(ATK_EDITABLE_TEXT(obj),
620 string_to_int(param_string1), string_to_int(param_string2));
621 sprintf(output, "\nCutting text %d to %d...\n",
622 string_to_int(param_string1), string_to_int(param_string2));
623 set_output_buffer(output);
626 if (strcmp(testsOn[i], "atk_editable_text_paste_text") == 0)
628 param_string1 = get_arg_of_func(win_val, "atk_editable_text_paste_text",
630 atk_editable_text_paste_text(ATK_EDITABLE_TEXT(obj),
631 string_to_int(param_string1));
632 sprintf(output, "\nPasting text to %d\n", string_to_int(param_string1));
633 set_output_buffer(output);
636 if (strcmp(testsOn[i], "atk_editable_text_delete_text") == 0)
638 param_string1 = get_arg_of_func(win_val, "atk_editable_text_delete_text", "start");
639 param_string2 = get_arg_of_func(win_val, "atk_editable_text_delete_text", "end");
640 atk_editable_text_delete_text(ATK_EDITABLE_TEXT(obj),
641 string_to_int(param_string1), string_to_int(param_string2));
642 sprintf(output, "\nDeleting text %d to %d...\n",
643 string_to_int(param_string1), string_to_int(param_string2));
644 set_output_buffer(output);
647 if (strcmp(testsOn[i], "atk_editable_text_copy_text") == 0)
649 param_string1 = get_arg_of_func(win_val, "atk_editable_text_copy_text", "start");
650 param_string2 = get_arg_of_func(win_val, "atk_editable_text_copy_text", "end");
651 atk_editable_text_copy_text(ATK_EDITABLE_TEXT(obj),
652 string_to_int(param_string1), string_to_int(param_string2));
653 sprintf(output, "\nCopying text %d to %d...\n",
654 string_to_int(param_string1), string_to_int(param_string2));
655 set_output_buffer(output);
658 if (strcmp(testsOn[i], "atk_editable_text_insert_text") == 0)
660 param_string1 = get_arg_of_func(win_val, "atk_editable_text_insert_text",
662 param_string2 = get_arg_of_func(win_val, "atk_editable_text_insert_text",
664 param_int2 = string_to_int(param_string2);
665 atk_editable_text_insert_text(ATK_EDITABLE_TEXT(obj),
666 param_string1, strlen(param_string1), ¶m_int2);
667 sprintf(output, "\nInserting text at %d...\n", param_int2);
668 set_output_buffer(output);
676 * @obj: An #AtkObject
677 * @type: The type of test to run. Can be "at", "before", or "after".
678 * @offset: The offset into the text buffer.
679 * @boundary: The boundary type.
681 * Tests the following ATK_TEXT API functions:
682 * atk_text_get_text_at_offset
683 * atk_text_get_text_before_offseet
684 * atk_text_get_text_after_offset
686 void _run_offset_test(AtkObject * obj, char * type, gint offset,
687 AtkTextBoundary boundary)
689 gchar output[MAX_LINE_SIZE];
690 gchar default_val[5] = "NULL";
692 gint startOffset, endOffset;
694 if (strcmp(type, "at") == 0)
695 text = atk_text_get_text_at_offset (ATK_TEXT (obj),
696 offset, boundary, &startOffset, &endOffset);
697 else if (strcmp(type, "before") == 0)
698 text = atk_text_get_text_before_offset (ATK_TEXT (obj),
699 offset, boundary, &startOffset, &endOffset);
700 else if (strcmp(type, "after") == 0)
701 text = atk_text_get_text_after_offset (ATK_TEXT (obj),
702 offset, boundary, &startOffset, &endOffset);
707 text = g_strdup (default_val);
709 if (boundary == ATK_TEXT_BOUNDARY_CHAR)
710 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_CHAR|\n",
712 else if (boundary == ATK_TEXT_BOUNDARY_WORD_START)
713 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_WORD_START|\n",
715 else if (boundary == ATK_TEXT_BOUNDARY_WORD_END)
716 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_WORD_END|\n",
718 else if (boundary == ATK_TEXT_BOUNDARY_SENTENCE_START)
719 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_SENTENCE_START|\n",
721 else if (boundary == ATK_TEXT_BOUNDARY_SENTENCE_END)
722 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_SENTENCE_END|\n",
724 else if (boundary == ATK_TEXT_BOUNDARY_LINE_START)
725 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_LINE_START|\n",
727 else if (boundary == ATK_TEXT_BOUNDARY_LINE_END)
728 sprintf(output, "\n|%s| Text |%s| Boundary |BOUNDARY_LINE_END|\n",
731 sprintf(output, "\n|%s| Text |%s| Boundary |UNKNOWN|\n",
735 set_output_buffer(output);
737 sprintf(output, "Offset %d, startOffset %d, endOffset %d\n",
738 offset, startOffset, endOffset);
739 set_output_buffer(output);