diff --git a/Makefile b/Makefile index 654d45c..59a200f 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,9 @@ split-input/%.md5: input/%.alephseq slices/%.md5: split-input/%.md5 scripts/update-slices.sh $^ $@ +refdata/subst-260c.csv: refdata/fennica-dates.csv.gz + zcat $^ | scripts/extract-subst-260c.py >$@ + refdata/iso639-2-fi.csv: sparql/extract-iso639-2-fi.rq $(RSPARQL) --service $(FINTOSPARQL) --query $^ --results=CSV >$@ diff --git a/refdata/fennica-dates.csv.gz b/refdata/fennica-dates.csv.gz new file mode 100644 index 0000000..14e40a7 Binary files /dev/null and b/refdata/fennica-dates.csv.gz differ diff --git a/test/00_refdata.bats b/test/00_refdata.bats index 4d28c34..b9e6c2e 100644 --- a/test/00_refdata.bats +++ b/test/00_refdata.bats @@ -51,3 +51,7 @@ setup () { [ -s refdata/RDAMediaType.nt ] } +@test "Reference data: 260c date value substitutions" { + make refdata/subst-260c.csv + [ -s refdata/subst-260c.csv ] +} diff --git a/test/input/suoja-pirtti.alephseq b/test/input/suoja-pirtti.alephseq new file mode 100644 index 0000000..9bccb2a --- /dev/null +++ b/test/input/suoja-pirtti.alephseq @@ -0,0 +1,25 @@ +000005646 FMT L BK +000005646 LDR L 00000cam^a2200577zi^4500 +000005646 001 L 000005646 +000005646 005 L 20180104164905.0 +000005646 008 L 820419s1981^^^^fi^|||||||||||||||||fin|| +000005646 015 L $$af820558$$2skl +000005646 035 L $$a(FI-MELINDA)000005646 +000005646 040 L $$aFI-NL +000005646 0410 L $$afin +000005646 042 L $$afinb +000005646 080 L $$a361/362 +000005646 080 L $$a364$$21974/fin/fennica$$9FENNI +000005646 080 L $$a613$$21974/fin/fennica$$9FENNI +000005646 080 L $$a613.81$$21974/fin/fennica$$9FENNI +000005646 080 L $$a364.65$$x-05$$x(091)$$21974/fin/fennica$$9FENNI +000005646 24500 L $$a20 vuotta päihdehuoltoa 1961-1981 /$$c[julk.] Suoja-pirti r.y. +000005646 260 L $$a[Hki] :$$bSuoja-pirtti,$$c[1981] f [Merkur] +000005646 300 L $$a[2], 33, [1] s. :$$bkuvitettu ;$$c25 cm +000005646 336 L $$ateksti$$btxt$$2rdacontent +000005646 337 L $$akäytettävissä ilman laitetta$$bn$$2rdamedia +000005646 338 L $$anide$$bnc$$2rdacarrier +000005646 7102 L $$aSuoja-pirtti. +000005646 7400 L $$aKaksikymmentä vuotta päihdehuoltoa 1961-1981. +000005646 903 L $$ab$$5FENNI +000005646 904 L $$ap$$5FENNI diff --git a/test/refdata/fennica-dates.csv.gz b/test/refdata/fennica-dates.csv.gz new file mode 120000 index 0000000..b26c165 --- /dev/null +++ b/test/refdata/fennica-dates.csv.gz @@ -0,0 +1 @@ +../../refdata/fennica-dates.csv.gz \ No newline at end of file