X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;ds=inline;f=t%2Fsrc%2Fgom_write.c;h=cdf8b0638ed966a9c9e338b9d8069a0f7e918975;hb=26b300c73fd81fea51f15d66c0e94d8e32728660;hp=388432887ed9b449e05dcb47f1ced029d771e0c7;hpb=e5f86c3d527897be1f7e7135ffdfc023831aaebd;p=gedcom-parse.git diff --git a/t/src/gom_write.c b/t/src/gom_write.c index 3884328..cdf8b06 100644 --- a/t/src/gom_write.c +++ b/t/src/gom_write.c @@ -59,20 +59,30 @@ void show_help () printf(" can be CR, LF, CR_LF, LF_CR\n"); } -int update_charset(char* encoding) +int update_header(char* encoding) { struct header* head = NULL; char* value; + char* long_note = "This note is for testing the continuation stuff\n" + "Some Specials: This line is very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long but too long (255 caharcters is the limit), so this is going over the border\n" + "And now we have an at character: @, which should be doubled"; head = gom_get_header(); if (head == NULL) return 1; else { + /* value = gom_set_string(&head->charset.name, encoding); if (value == NULL || strcmp(value, encoding)) return 1; else return 0; + */ + value = gom_set_string(&head->note, long_note); + if (value == NULL || strcmp(value, long_note)) + return 1; + else + return 0; } } @@ -193,10 +203,8 @@ int main(int argc, char* argv[]) output_open(outfilename); result = gom_new_model(); - /* if (result == 0) - result |= update_charset(encoding); - */ + result |= update_header(encoding); if (result == 0) result |= gom_write_file(gedfilename, &total_conv_fails); if (result == 0 && total_conv_fails == 0) {