--TEST-- marc_020: Test MARC binary output --SKIPIF-- --FILE-- next(); // create some subfields $subfields[] = new File_MARC_Subfield('a', 'nothing'); $subfields[] = new File_MARC_Subfield('z', 'everything'); // create a data field $data_field = new File_MARC_Data_Field('100', $subfields, '0'); // append the data field $marc_record->appendField($data_field); // create a control field $ctrl_field = new File_MARC_Control_Field('001', '01234567890'); // prepend the control field $marc_record->prependField($ctrl_field); // reproduce test case reported by Mark Jordan $subfields_966_2[] = new File_MARC_Subfield('l', 'web'); $subfields_966_2[] = new File_MARC_Subfield('r', '0'); $subfields_966_2[] = new File_MARC_Subfield('s', 'b'); $subfields_966_2[] = new File_MARC_Subfield('i', '49'); $subfields_966_2[] = new File_MARC_Subfield('c', '1'); $field_966_2 = new File_MARC_Data_Field('966', $subfields_966_2, null, null); $marc_record->appendField($field_966_2); // let's see the results print convert_uuencode($marc_record->toRaw()); ?> --EXPECT-- M,#$Y-#,@("`@(#(R,#`U-3,@("`T-3`P,#`Q,#`Q,C`P,#`P,#`Q,#`Q,3`P M,#$R,#`S,#`P-S`P,#(S,#`X,#`S.3`P,#,P,#(P,#`R-C`P,#8Y,#,U,#`Q M-3`P,#DU,#0P,#`P-S`P,3$P,#0R,#`Q,C`P,3$W,#@T,#`Q.#`P,3(Y,#@T M,#`Q.#`P,30W,#@T,#`R,3`P,38U,#@T,#`R,C`P,3@V,3`P,#`S,#`P,C`X M,C0U,#`V,C`P,C,X,C4P,#`Q,S`P,S`P,C8P,#`U.#`P,S$S,S`P,#`S,S`P M,S14U)3$1!'CDX M,#$R,',Q.3DX("`@(&9I("`@("!J("`@("`@,#`P(#`@("`?.3DU,34P,#@X,#@>("`?84Y"'B`@'SE. M0A\Y4T5%'B`@'V%(8V0L=1\R:W-S8B\V'B`@'S5.0A]A=4AC'S)K6YL:6=A(&)A M(#`?84UU;6EN+6)I8FQI;W1E:V5T+!]X.3DM,#8Y.#DS M,2TY'B`@'V%/("`?84QI.B!3'C0@'V%$970@ M;W-Y;FQI9V$@8F%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