Skip to content

Commit

Permalink
Update test to show that marc:leader isn't pretty printed (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr0i committed Sep 5, 2024
1 parent 57f9344 commit 9c0b4af
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,19 @@ public void createAnEmptyRecord() {
@Test
public void createARecordPrettyPrint() {
encoder.setFormatted(true);
addOneRecord(encoder);
encoder.startRecord(RECORD_ID);
encoder.startEntity(Marc21EventNames.LEADER_ENTITY);
encoder.literal(Marc21EventNames.LEADER_ENTITY, "dummy");
encoder.endEntity();
encoder.literal("001", RECORD_ID);
encoder.startEntity("010 ");
encoder.literal("a", RECORD_ID);
encoder.endEntity();
encoder.endRecord();
encoder.closeStream();
String expected = XML_DECLARATION + "\n" + XML_ROOT_OPEN + "\n"// " <marc:record>\n"
String expected = XML_DECLARATION + "\n" + XML_ROOT_OPEN + "\n"
+ "\t<marc:record>\n"//
+ "\t\t<marc:leader>dummy</marc:leader>\n"
+ "\t\t<marc:controlfield tag=\"001\">92005291</marc:controlfield>\n"//
+ "\t\t<marc:datafield tag=\"010\" ind1=\" \" ind2=\" \">\n"//
+ "\t\t\t<marc:subfield code=\"a\">92005291</marc:subfield>\n"//
Expand Down

0 comments on commit 9c0b4af

Please sign in to comment.