X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fsrc%2Fgom_write.c;h=30a45a64c777b4332638b8b340cfa20d3393fe75;hb=ea81accae13a4617cc46f5256dad50e2732cc206;hp=c0c9199553d953c21e3312564be5bad3a99a4c01;hpb=4ff6c7ea2919afc5495b4d55144eb8d4c45fe44d;p=gedcom-parse.git diff --git a/t/src/gom_write.c b/t/src/gom_write.c index c0c9199..30a45a6 100644 --- a/t/src/gom_write.c +++ b/t/src/gom_write.c @@ -235,8 +235,6 @@ int main(int argc, char* argv[]) gedcom_init(); setlocale(LC_ALL, ""); gedcom_set_message_handler(gedcom_message_handler); - gedcom_write_set_encoding(ENC_MANUAL, encoding, enc, bom); - gedcom_write_set_line_terminator(ENC_MANUAL, end); output_open(outfilename); @@ -244,15 +242,24 @@ int main(int argc, char* argv[]) result = gom_parse_file(infilename); } else { + gedcom_write_set_encoding(ENC_MANUAL, encoding, enc, bom); + gedcom_write_set_line_terminator(ENC_MANUAL, end); result = gom_new_model(); if (result == 0) result |= update_header(encoding); } if (result == 0) result |= test_timestamps(); - if (result == 0) + if (result == 0) { + output(1, "Writing file...\n"); result |= gom_write_file(gedfilename, &total_conv_fails); + } if (result == 0 && total_conv_fails == 0) { + output(1, "Re-parsing file...\n"); + gedcom_set_compat_handling(0); + result |= gom_parse_file(gedfilename); + } + if (result == 0) { output(1, "Test succeeded\n"); } else {