summaryrefslogtreecommitdiff
path: root/src/tests/eolian
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/eolian')
-rw-r--r--src/tests/eolian/eolian_generation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c
index 1e745e9f6d..097614657c 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -42,6 +42,8 @@ _files_compare (const char *ref_filename, const char *tmp_filename)
42 if (fread(tmp_content, tmp_filesize, 1, tmp_file) != 1) 42 if (fread(tmp_content, tmp_filesize, 1, tmp_file) != 1)
43 goto end; 43 goto end;
44 tmp_content[tmp_filesize] = '\0'; 44 tmp_content[tmp_filesize] = '\0';
45 while (tmp_content[tmp_filesize - 1] == '\n')
46 tmp_content[--tmp_filesize] = '\0';
45 47
46 fseek(ref_file, 0, SEEK_END); 48 fseek(ref_file, 0, SEEK_END);
47 long ref_filesize = ftell(ref_file); 49 long ref_filesize = ftell(ref_file);
@@ -51,6 +53,8 @@ _files_compare (const char *ref_filename, const char *tmp_filename)
51 if (fread(ref_content, ref_filesize, 1, ref_file) != 1) 53 if (fread(ref_content, ref_filesize, 1, ref_file) != 1)
52 goto end; 54 goto end;
53 ref_content[ref_filesize] = '\0'; 55 ref_content[ref_filesize] = '\0';
56 while (ref_content[ref_filesize - 1] == '\n')
57 ref_content[--ref_filesize] = '\0';
54 58
55 if (tmp_filesize != ref_filesize) goto end; 59 if (tmp_filesize != ref_filesize) goto end;
56 60