summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2016-08-02 23:23:31 +0100
committerAndy Williams <andy@andywilliams.me>2016-08-02 23:23:31 +0100
commitf7396703c5a5b27e396312466498de302537a0c2 (patch)
tree7784c44c7c610e413e1178c2014ec5d282fc7d57
parent716be1bae404ceab049832da679d4e0598791ae2 (diff)
downloadefl-f7396703c5a5b27e396312466498de302537a0c2.tar.gz
Fix text check in Elm_Code T4264
An incorrect assumption in how unused memory may be initialised @fix
-rw-r--r--src/tests/elementary/elm_code_test_text.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/elementary/elm_code_test_text.c b/src/tests/elementary/elm_code_test_text.c
index 934b98b425..51dbf8d0b7 100644
--- a/src/tests/elementary/elm_code_test_text.c
+++ b/src/tests/elementary/elm_code_test_text.c
@@ -14,13 +14,18 @@ START_TEST (elm_code_text_get_test)
Elm_Code_File *file;
Elm_Code_Line *line;
+ const char *str;
+ int len;
+
elm_init(1, NULL);
code = elm_code_create();
file = elm_code_file_new(code);
elm_code_file_line_append(file, "test", 4, NULL);
line = elm_code_file_line_get(file, 1);
- ck_assert_str_eq("test", elm_code_line_text_get(line, NULL));
+ str = elm_code_line_text_get(line, &len);
+
+ ck_assert_strn_eq("test", str, len);
elm_shutdown();
}
END_TEST