forked from enlightenment/efl
Fix further text checks in Elm_Code T4264
An incorrect assumption in how unused memory may be initialised @fix
This commit is contained in:
parent
7925c56ec9
commit
f2a4ff154f
|
@ -15,7 +15,7 @@ START_TEST (elm_code_text_get_test)
|
|||
Elm_Code_Line *line;
|
||||
|
||||
const char *str;
|
||||
int len;
|
||||
unsigned int len;
|
||||
|
||||
elm_init(1, NULL);
|
||||
code = elm_code_create();
|
||||
|
@ -35,6 +35,8 @@ START_TEST (elm_code_text_insert_test)
|
|||
Elm_Code *code;
|
||||
Elm_Code_File *file;
|
||||
Elm_Code_Line *line;
|
||||
const char *text;
|
||||
unsigned int length;
|
||||
|
||||
elm_init(1, NULL);
|
||||
code = elm_code_create();
|
||||
|
@ -44,7 +46,8 @@ START_TEST (elm_code_text_insert_test)
|
|||
line = elm_code_file_line_get(file, 1);
|
||||
|
||||
elm_code_line_text_insert(line, 4, "ing", 3);
|
||||
ck_assert_str_eq("testing", elm_code_line_text_get(line, NULL));
|
||||
text = elm_code_line_text_get(line, &length);
|
||||
ck_assert_strn_eq("testing", text, length);
|
||||
elm_shutdown();
|
||||
}
|
||||
END_TEST
|
||||
|
|
|
@ -376,6 +376,7 @@ START_TEST (elm_code_test_widget_selection_reverse_delete_twoline)
|
|||
Elm_Code_Widget *widget;
|
||||
Evas_Object *win;
|
||||
const char *text;
|
||||
unsigned int length;
|
||||
|
||||
elm_init(1, NULL);
|
||||
code = elm_code_create();
|
||||
|
@ -395,8 +396,8 @@ START_TEST (elm_code_test_widget_selection_reverse_delete_twoline)
|
|||
elm_code_widget_selection_delete(widget);
|
||||
|
||||
line = elm_code_file_line_get(file, 1);
|
||||
text = elm_code_line_text_get(line, NULL);
|
||||
ck_assert_str_eq("teXT", text);
|
||||
text = elm_code_line_text_get(line, &length);
|
||||
ck_assert_strn_eq("teXT", text, length);
|
||||
ck_assert_int_eq(1, elm_code_file_lines_get(file));
|
||||
|
||||
elm_code_free(code);
|
||||
|
|
Loading…
Reference in New Issue