From 26b300c73fd81fea51f15d66c0e94d8e32728660 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 8 Dec 2002 17:02:08 +0000 Subject: [PATCH] Testing long string values with at characters... --- t/output/write_gom_ansel.ged | 4 ++++ t/output/write_gom_ascii.ged | 4 ++++ t/output/write_gom_uhlbomcl.ged | Bin 216 -> 1050 bytes t/output/write_gom_uhlcl.ged | Bin 214 -> 1048 bytes t/output/write_gom_ulhbomcl.ged | Bin 216 -> 1050 bytes t/output/write_gom_ulhc.ged | Bin 198 -> 1024 bytes t/output/write_gom_ulhcl.ged | Bin 214 -> 1048 bytes t/output/write_gom_ulhl.ged | Bin 198 -> 1024 bytes t/output/write_gom_ulhlc.ged | Bin 214 -> 1048 bytes t/src/gom_write.c | 16 ++++++++++++---- 10 files changed, 20 insertions(+), 4 deletions(-) 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 3830cfcc638cc898cf3fa4b11a2881d0aad3ff7f..825cb61247fd15d5cae02bd59e09b060cb04320f 100644 GIT binary patch literal 1050 zcmeH{O-n*S7=_O|=s(P|prQf^S|w^FnT1;0xPA-j4ZSA)`RX}yy-Kxg8^fJ>KhB&v zGw-V(pE_00t!gT(s(tP048N@hJ*kCtL#C<<{=HuG2&zT47Ln)VpRpYY@SL#sV#`tN zH0O6@31n%@a1D10_MnF9YDOjAd%W@Quy@KTXtjpG+(uWOQK)Xh)Bzos$C_w~HCL)k z1FYO1;xF(VTQW~TjG{k|s2=(GCcaVrY8Lmm^~&0VH_?ha|jx51eb@ zUdcNoBjXCWRx`d#hdRPvMz-un^($nGUd#87z!hDUZt7|^Ict~fLj8E=?>;J{v=5`Z zcFnquO03lV5m?=c?n>Vwzd^FSgM00YVYTb1$`~sj!?)r_=I%zOevEX94TxHa{|7q! IvKoB&U-l=f!~g&Q delta 22 ccmbQmaf5NfNqz$c1%?oYAO;^G=4Idl07fGOj{pDw diff --git a/t/output/write_gom_uhlcl.ged b/t/output/write_gom_uhlcl.ged index 2e10525ad2fb65cd86b203b79701f8fe04a9c81d..15625ee6297b20adab40beceba3ccc980788a0d3 100644 GIT binary patch literal 1048 zcmeH{OHTqZ6ot>)#Q)HxCTh@xn7EPvDiP6ux-~Pr6CMU;B>sE9(_tX$(yeKxy^qt= z)7}fJDCka2)zr|T4s?#+)1zM0#kwWaP#yn4Z+ZgNCEJY13-Yhnjs#V7#@@>vN4e9S z-;q_2)g8kP++Em%+G?p2m3Z&z*1yNzE32c`8Uk|XpxWA`&);_$6X6(5l zyH_)d=k3*efL-Ym%)j-wH<-n`xss`Js^$tW8G$Oee$E`xhgC+PJ_#L?@b-Ohu7P`{ z=#Y$zE96?u`7#~r1b-dbvLDs2lPPn19(Qujw-btk$jeTU)($?gvBwQGjeZlWqKhB&v zGw-XPA0-9ds-`PdwXZ#$;Q~4Vy_WAEfh)Qy-PF};a@H={h5GT#-+gq2(msst z+BNGsDzQ@cM__d)x+{H${07PP4(_!}hSjd4Dr2mC3}42L%-xMl{TS&I8xXY;{||Kd JWi|Nhe*vHUtHb~R delta 23 dcmbQmaf5Nf2>}BJ1%?oYAO;^G=4Iew002s{1djj! diff --git a/t/output/write_gom_ulhc.ged b/t/output/write_gom_ulhc.ged index 5e66b5b011393f5169b8e437947be58d8c1b68a4..9491e575d681f334660a55d85912dcc358bcdce0 100644 GIT binary patch literal 1024 zcmeH`%}&BV6ot9R_uJ-WPr47{hBX^pj1u8l@mr9Z}B z;W@VEJp(a`{xqTnvP#P^qLPQrDv&t{=J@h!qH)6fNpX#^vb!GJg)NZ2kN>y_yduC);8pacUcJT}~VL4>?yl&aIk%d`$ zHUhh6(DP{iCHr*G-*a}&GSe;DS;Uz2lzs(Ynmq*obJ2ztuCE@TVns--!CD APXGV_ delta 21 bcmZqRIL0_(2cH3h0z(Kx5Q7g8^D+PcJpBYm diff --git a/t/output/write_gom_ulhcl.ged b/t/output/write_gom_ulhcl.ged index baf199d6808305533353d5ceffa2bf201c7b8150..8308b2c849e41ce0146c93e6038afa387275b1fb 100644 GIT binary patch literal 1048 zcmeH`OG^VW6ot=P@IPd!pi+e*xU#fWi?vFtZe^x#=tJ5Wi~rv5WI8SC(yfF^?&IX- zB==55L3e7ZriKo6pmY459`&Lw)-9Qa>i7?O(-WvJ*=9sukblK?B&eb@_FnEd%AMx? zj;w;L?ig<1?!q3_R!g0z#CuP-{yp|ySsks`5SV-DYB5UH9hja$2j+>UT4OD=RHh+T z;g9fFc#f@^ry$1BpF~uj{9+r=l|;*t5Yf3tjPgc)l@4e5y_TBC{XM<2_Tf!5W6u@Y zy_#7(Z?EP9>`I?t{;j{g!7SFzl}wdWHCK4a2vouKbLNOXtTF=iN$8M-x9@{<4cse5 zhh$`2A=hfom+4q1`0L1){iuGOOxbJ2{xP_+tCrikT1~;4l3i&K&-~p-HIxoubk}ZJ zH&Ka|x<3M|JJDU~I}|rac6V^ET{En96IB^wG7VxRB{n2#B^7ed{8?>2 F`(Jp^smA~S delta 23 dcmbQiagA}pF#!Vx1%?oYAO;^G=4Iew002rg1c?9u diff --git a/t/output/write_gom_ulhl.ged b/t/output/write_gom_ulhl.ged index b02d6b92e52d37880dd0fcb1d00f33a51a7fa7e0..873a1bf98c484031d46a2ee68552dbc4eb3f5c35 100644 GIT binary patch literal 1024 zcmeH`OHaZ;6ot>4UolHf)SwA5aU}s%qM|A4*0j76pa!VKfA4pu1&mv_X41}moO|bV z&TU;mcj~CAwrV=Z>+4CcO0aH;x7EUb)VrR+BxF0_F37%N*$=AgjLOTZepmGy)d1C~ zYH#S7&^72mUG?Jmt~;&#d+Z&b7W{m2;N6E!msK+D(d7kX;62q$YpkVmZ8X9v{W1Ou z&#^V{8Hh>rrx7(EzpUbg(r7snBD&C+Rep)@p~p$Sp7f%%f`7F;jtN);DJbRIqx^95JO0RzRPW`AE6@0XS>mNh#-JL&geO zs|C+S$2!4Z$8OI4RKK;aE2}4lg z5!gM0o=5X9*{6H{p0jI~nQqC>BF3zz^egxp_s(LcVT@$NMnr4;t)9_@KP|!g1~0~` AD*ylh delta 21 bcmZqRIL0_(2cH3h0z(Kx5Q7g8b1?t_Jof}d diff --git a/t/output/write_gom_ulhlc.ged b/t/output/write_gom_ulhlc.ged index 8b7ec454db624b5d7b4f4ccc35bb7e9caa06db6f..5bf5a1a68f7b2eba2f11525040977b4f1693fe3c 100644 GIT binary patch literal 1048 zcmeH`OG^VW6ot=P@IPd!pi+e*xU#fWi?vFtZe^x#=tJ5Wi~rv5WI8SC(yfF^?&IX- zB==55L3e7ZriKo5sB`?D9`&Lw)-9Qa>i7?O(-WvJ*=9sukblK?B&eb@_FnEd%AMx? zj;w;L?ig<1?!q3_R!g0z#CuP-{yp|ySsks`5SV-DYB5UH9hja$2j+>UT4OD=RHh+T z;g9fFc#f@^ry$1BpF~uj{9+r=l|;*t5Yf3tjPgc)l@4e5y_TBC{XM<2_Tf!5W6u@Y zy_#7(Z?EP9>`I?t{;j{g!7SFzl}wdWHCK4a2vouKbLNOXtTF=iN$8M-x9@{<4cse5 zhh$`2A=hfom+4q1`0L1){iuGOOxbJ2{xP_+tCrikT1~;4l3i&K&-~p-HIxoubk}ZJ zH&Ka|x<3M|JJDU~I}|rac6V^ET{En96IB^wG7VxRB{n2#B^7ed{8?>2 F`(Jp6smA~S delta 23 dcmbQiagA}pF#!Vx1%?oYAO;^G=3?Mw002ra1c?9u 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) { -- 2.30.2