2 -- Turn off echo and keep things quiet.
6 -- Format the output for nice TAP.
11 -- Revert all changes on failure.
12 \set ON_ERROR_ROLLBACK 1
13 \set ON_ERROR_STOP true
16 -- Load the TAP functions.
23 SELECT is(evergreen.lpad_number_substrings(
24 'Appendix','0',5), 'Appendix','Non-numeric string');
26 SELECT is(evergreen.lpad_number_substrings(
27 'DISC 11','0',5), 'DISC 00011','Prefix, 1 number');
29 SELECT is(evergreen.lpad_number_substrings(
30 'DISC 14.1','0',5), 'DISC 00014.00001','Prefix, 2 numbers');
32 SELECT is(evergreen.lpad_number_substrings(
33 'DISC 12.12.13','0',5), 'DISC 00012.00012.00013','Prefix, 3 numbers');
35 SELECT is(evergreen.lpad_number_substrings(
36 'Vol 5a-15','0',5), 'Vol 00005a-00015','Mixed format');
39 -- Finish the tests and clean up.
40 SELECT * FROM finish();