Permalink
Browse files

Add test case for uppercase subfield codes

Ross Singer reported a problem parsing a particular record that had
uppercase subfield codes - parsing failed with the error message:
"Maximum function nesting level of '100' reached, aborting! in
LinkedList"

Googling suggests this is related to xdebug usage, but having a test
case certainly can't hurt. FWIW, this test case passes on Fedora 17 with
PHP 5.4.3.

Signed-off-by: Dan Scott <dan@coffeecode.net>
  • Loading branch information...
1 parent 9189f09 commit 40d21ff22f545731c2f8dba04c72046efd148d3e @dbs dbs committed May 29, 2012
Showing with 42 additions and 1 deletion.
  1. +1 −1 tests/marc_xml_rsinger.phpt
  2. +41 −0 tests/rsinger.xml
@@ -1,5 +1,5 @@
--TEST--
-marc_xml_rsinger: iterate and pretty print a non-compliant MARC record (tag = '30-', missing indicator in 245)
+marc_xml_rsinger2: iterate and pretty print a non-compliant MARC record (uppercase subfield codes)
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
View
@@ -0,0 +1,41 @@
+<record xmlns="http://www.loc.gov/MARC21/slim">
+ <leader>00488nam a2200193 4500</leader>
+ <controlfield tag="001">vtls002817361</controlfield>
+ <controlfield tag="003">WlAbNL</controlfield>
+ <controlfield tag="005">20060313054800.0</controlfield>
+ <controlfield tag="008">060313 || | ||| d</controlfield>
+ <datafield tag="016" ind1=" " ind2=" ">
+ <subfield code="a">FREPO</subfield>
+ </datafield>
+ <datafield tag="020" ind1=" " ind2=" ">
+ <subfield code="a">0751712035</subfield>
+ </datafield>
+ <datafield tag="035" ind1=" " ind2=" ">
+ <subfield code="a">(WlAbNL)LLGCb13197045</subfield>
+ </datafield>
+ <datafield tag="039" ind1=" " ind2="9">
+ <subfield code="y">200603130548</subfield>
+ <subfield code="z">load</subfield>
+ </datafield>
+ <datafield tag="040" ind1=" " ind2=" ">
+ <subfield code="a">CA</subfield>
+ </datafield>
+ <datafield tag="245" ind1="1" ind2="0">
+ <subfield code="a">Financial Reporting.\ Paper 2.5</subfield>
+ </datafield>
+ <datafield tag="250" ind1=" " ind2=" ">
+ <subfield code="a">3rd 2003</subfield>
+ </datafield>
+ <datafield tag="260" ind1=" " ind2=" ">
+ <subfield code="b">BPP Publishing Ltd</subfield>
+ </datafield>
+ <datafield tag="949" ind1=" " ind2=" ">
+ <subfield code="A">VIRTUAITEM</subfield>
+ <subfield code="D">2200000</subfield>
+ <subfield code="X">1</subfield>
+ <subfield code="6">0627390</subfield>
+ </datafield>
+ <datafield tag="999" ind1=" " ind2=" ">
+ <subfield code="a">VIRTUA50 </subfield>
+ </datafield>
+</record>

0 comments on commit 40d21ff

Please sign in to comment.