forked from enlightenment/efl
elm_code: ooops, fix test from previous refactor
This commit is contained in:
parent
9eba6bf2e7
commit
717a0159d2
|
@ -66,29 +66,31 @@ START_TEST (elm_code_indent_matching_braces)
|
||||||
Elm_Code_Line *line;
|
Elm_Code_Line *line;
|
||||||
Elm_Code *code;
|
Elm_Code *code;
|
||||||
const char *str;
|
const char *str;
|
||||||
unsigned int row;
|
|
||||||
|
|
||||||
elm_init(1, NULL);
|
elm_init(1, NULL);
|
||||||
code = elm_code_create();
|
code = elm_code_create();
|
||||||
file = elm_code_file_new(code);
|
file = elm_code_file_new(code);
|
||||||
|
|
||||||
line = elm_code_file_line_append(file, " if ()", 8, NULL);
|
elm_code_file_line_append(file, "", 8, NULL);
|
||||||
|
line = elm_code_file_line_get(file, 1);
|
||||||
|
|
||||||
|
elm_code_file_line_insert(file, 1, " if ()", 8, NULL);
|
||||||
str = elm_code_line_indent_matching_braces_get(line);
|
str = elm_code_line_indent_matching_braces_get(line);
|
||||||
ck_assert_str_eq("", str);
|
ck_assert_str_eq("", str);
|
||||||
|
|
||||||
line = elm_code_file_line_append(file, " {", 6, NULL);
|
elm_code_file_line_insert(file, 2, " {", 6, NULL);
|
||||||
str = elm_code_line_indent_matching_braces_get(line);
|
str = elm_code_line_indent_matching_braces_get(line);
|
||||||
ck_assert_str_eq(" ", str);
|
ck_assert_str_eq(" ", str);
|
||||||
|
|
||||||
line = elm_code_file_line_append(file, " if (){", 14, NULL);
|
elm_code_file_line_insert(file, 3, " if (){", 14, NULL);
|
||||||
str = elm_code_line_indent_matching_braces_get(line;
|
str = elm_code_line_indent_matching_braces_get(line);
|
||||||
ck_assert_str_eq(" ", str);
|
ck_assert_str_eq(" ", str);
|
||||||
|
|
||||||
line = elm_code_file_line_append(file, " }", 9, NULL);
|
elm_code_file_line_insert(file, 4, " }", 9, NULL);
|
||||||
str = elm_code_line_indent_matching_braces_get(line);
|
str = elm_code_line_indent_matching_braces_get(line);
|
||||||
ck_assert_str_eq(" ", str);
|
ck_assert_str_eq(" ", str);
|
||||||
|
|
||||||
line = elm_code_file_line_append(file, " }", 6, NULL);
|
elm_code_file_line_insert(file, 5, " }", 6, NULL);
|
||||||
str = elm_code_line_indent_matching_braces_get(line);
|
str = elm_code_line_indent_matching_braces_get(line);
|
||||||
ck_assert_str_eq("", str);
|
ck_assert_str_eq("", str);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue