Skip to content

Commit e9536c4

Browse files
committed
Tests for 008 date, which are novel it seems.
1 parent a45d311 commit e9536c4

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

test/ConvSpec-006,008.xspec

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,12 @@
138138
</x:context>
139139
<x:expect label="Return the carrier URI from the 008" select="'http://id.loc.gov/vocabulary/carriers/cz'"/>
140140
</x:scenario>
141+
142+
<x:scenario label="008 - DATES">
143+
<x:context href="data/ConvSpec-006,008/marc.xml"/>
144+
<x:expect label="s date" test="//bf:Instance[15]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='2002'"/>
145+
<x:expect label="m date" test="//bf:Instance[16]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='2013/2016'"/>
146+
<x:expect label="q date" test="//bf:Instance[17]/bf:provisionActivity/bf:ProvisionActivity/bf:date[@rdf:datatype='http://id.loc.gov/datatypes/edtf']='1900~/1956~'"/>
147+
</x:scenario>
141148

142149
</x:description>

test/data/ConvSpec-006,008/marc.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,14 @@
8484
<controlfield tag="001">15</controlfield>
8585
<controlfield tag="008">030311s2002 xxu mleng </controlfield>
8686
</record>
87+
<record>
88+
<leader>08525cam a2201477 i 4500</leader>
89+
<controlfield tag="001">16</controlfield>
90+
<controlfield tag="008">130806m20132016gaua j 6 000 0aeng c</controlfield>
91+
</record>
92+
<record>
93+
<leader>01344cam a22003137a 4500</leader>
94+
<controlfield tag="001">17</controlfield>
95+
<controlfield tag="008">001128q19001956ja 000 0 jpn </controlfield>
96+
</record>
8797
</collection>

0 commit comments

Comments
 (0)