--- /dev/null
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- let's do this thing
+BEGIN;
+
+SELECT plan(1);
+
+SELECT is(
+ $$<record xmlns="http://www.loc.gov/MARC21/slim"><leader>00881nam a2200193 4500</leader><datafield tag="600" ind1="1" ind2=" "><subfield code="a">Girdlestone, Cuthbert Morton,</subfield><subfield code="d">1895-1975</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Girdlestone, Cuthbert Morton,</subfield><subfield code="d">1895-1975</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Girdlestone, Cuthbert Morton,</subfield><subfield code="d">1895-1975</subfield></datafield><datafield tag="800" ind1="1" ind2=" "><subfield code="a">Girdlestone, Cuthbert Morton,</subfield><subfield code="d">1895-1975</subfield></datafield><datafield tag="905" ind1=" " ind2=" "><subfield code="r">600abcdefklmnopqrstvxyz[0~\)1$],100abcdefklmnopqrstvxyz[0~\)1$],700abcdefklmnopqrstvxyz[0~\)1$],800abcdefklmnopqrstvxyz[0~\)1$]</subfield></datafield></record>$$,
+ (select authority.generate_overlay_template(marc) from authority.record_entry where id = 1),
+ 'authority.generate_overlay_template includes indicators and excludes junk tags'
+);
+
+
+SELECT * FROM finish();
+ROLLBACK;
+