Mercurial > gemma
comparison schema/isrs_tests.sql @ 569:ad07846b09d1
Add function to construct isrs from text
In passing moved all related functionality to its own set of files.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 05 Sep 2018 11:05:58 +0200 |
parents | |
children | 61af85a432bf |
comparison
equal
deleted
inserted
replaced
568:99968a7394f7 | 569:ad07846b09d1 |
---|---|
1 -- | |
2 -- pgTAP test script for ISRS location code types and functions | |
3 -- | |
4 | |
5 SELECT results_eq($$ | |
6 SELECT isrs_fromText('DEXXX039000000005023') | |
7 $$, | |
8 $$ | |
9 SELECT CAST(('DE', 'XXX', '03900', '00000', 5023) AS isrs) | |
10 $$, | |
11 'Correct ISRS text input gives respective ISRS location code'); | |
12 | |
13 SELECT throws_ok($$ | |
14 SELECT isrs_fromText('DEUXXX039000000005023') | |
15 $$, | |
16 22023, NULL, | |
17 'ISRS text input needs to have correct length'); |