From: Peter Verthez Date: Sun, 8 Dec 2002 17:02:08 +0000 (+0000) Subject: Testing long string values with at characters... X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=26b300c73fd81fea51f15d66c0e94d8e32728660;p=gedcom-parse.git Testing long string values with at characters... --- diff --git a/t/output/write_gom_ansel.ged b/t/output/write_gom_ansel.ged index 6e3a959..b22c775 100644 --- a/t/output/write_gom_ansel.ged +++ b/t/output/write_gom_ansel.ged @@ -5,4 +5,8 @@ 2 VERS 5.5 2 FORM LINEAGE-LINKED 1 CHAR ASCII +1 NOTE This note is for testing the continuation stuff +2 CONT 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 th +2 CONC is is going over the border +2 CONT And now we have an at character: @@, which should be doubled 0 TRLR diff --git a/t/output/write_gom_ascii.ged b/t/output/write_gom_ascii.ged index 6e3a959..b22c775 100644 --- a/t/output/write_gom_ascii.ged +++ b/t/output/write_gom_ascii.ged @@ -5,4 +5,8 @@ 2 VERS 5.5 2 FORM LINEAGE-LINKED 1 CHAR ASCII +1 NOTE This note is for testing the continuation stuff +2 CONT 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 th +2 CONC is is going over the border +2 CONT And now we have an at character: @@, which should be doubled 0 TRLR diff --git a/t/output/write_gom_uhlbomcl.ged b/t/output/write_gom_uhlbomcl.ged index 3830cfc..825cb61 100644 Binary files a/t/output/write_gom_uhlbomcl.ged and b/t/output/write_gom_uhlbomcl.ged differ diff --git a/t/output/write_gom_uhlcl.ged b/t/output/write_gom_uhlcl.ged index 2e10525..15625ee 100644 Binary files a/t/output/write_gom_uhlcl.ged and b/t/output/write_gom_uhlcl.ged differ diff --git a/t/output/write_gom_ulhbomcl.ged b/t/output/write_gom_ulhbomcl.ged index 6672931..4127d84 100644 Binary files a/t/output/write_gom_ulhbomcl.ged and b/t/output/write_gom_ulhbomcl.ged differ diff --git a/t/output/write_gom_ulhc.ged b/t/output/write_gom_ulhc.ged index 5e66b5b..9491e57 100644 Binary files a/t/output/write_gom_ulhc.ged and b/t/output/write_gom_ulhc.ged differ diff --git a/t/output/write_gom_ulhcl.ged b/t/output/write_gom_ulhcl.ged index baf199d..8308b2c 100644 Binary files a/t/output/write_gom_ulhcl.ged and b/t/output/write_gom_ulhcl.ged differ diff --git a/t/output/write_gom_ulhl.ged b/t/output/write_gom_ulhl.ged index b02d6b9..873a1bf 100644 Binary files a/t/output/write_gom_ulhl.ged and b/t/output/write_gom_ulhl.ged differ diff --git a/t/output/write_gom_ulhlc.ged b/t/output/write_gom_ulhlc.ged index 8b7ec45..5bf5a1a 100644 Binary files a/t/output/write_gom_ulhlc.ged and b/t/output/write_gom_ulhlc.ged differ 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) {