LP1857060: Tests for ISBNs with 979 prefix
[evergreen-equinox.git] / Open-ILS / src / sql / Pg / t / lp1857060_handle_all_types_of_isbn.pg
1 BEGIN;
2
3 SELECT plan(4);
4
5 SELECT is(
6     (SELECT public.translate_isbn1013('9791186178140')),
7     '9791186178140 ',
8     'public.translate_isbn1013 can handle 979 ISBNs'
9 );
10
11 SELECT is(
12     (SELECT public.translate_isbn1013('9780735220171')),
13     '9780735220171 0735220174 ',
14     'public.translate_isbn1013 can translate 978 ISBNs to ISBN10s'
15 );
16
17 SELECT is(
18     (SELECT public.translate_isbn1013('0735220174')),
19     '0735220174 9780735220171 ',
20     'public.translate_isbn1013 can translate ISBN10s to ISBN13s'
21 );
22
23 SELECT is(
24     (SELECT public.translate_isbn1013('979-1186178140')),
25     '9791186178140 ',
26     'public.translate_isbn1013 can remove hyphens'
27 );
28
29
30 ROLLBACK;