summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2016-12-03 06:08:10 +0000
committerAndy Williams <andy@andywilliams.me>2016-12-03 14:36:17 +0000
commit717a0159d28ccbb0dc46a20bd94dc1217e3af4d8 (patch)
treefd9c6d10ef00fdf93c055d0f73634cb635d01747
parent9eba6bf2e7c78016f14d47f42e8558a1e0fb2370 (diff)
downloadefl-717a0159d28ccbb0dc46a20bd94dc1217e3af4d8.tar.gz
elm_code: ooops, fix test from previous refactor
-rw-r--r--src/tests/elementary/elm_code_test_indent.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/tests/elementary/elm_code_test_indent.c b/src/tests/elementary/elm_code_test_indent.c
index 4b71556b37..70ecc9e562 100644
--- a/src/tests/elementary/elm_code_test_indent.c
+++ b/src/tests/elementary/elm_code_test_indent.c
@@ -66,29 +66,31 @@ START_TEST (elm_code_indent_matching_braces)
Elm_Code_Line *line;
Elm_Code *code;
const char *str;
- unsigned int row;
elm_init(1, NULL);
code = elm_code_create();
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);
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);
ck_assert_str_eq(" ", str);
- line = elm_code_file_line_append(file, " if (){", 14, NULL);
- str = elm_code_line_indent_matching_braces_get(line;
+ elm_code_file_line_insert(file, 3, " if (){", 14, NULL);
+ str = elm_code_line_indent_matching_braces_get(line);
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);
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);
ck_assert_str_eq("", str);