Mercurial > gemma
view 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 |
line wrap: on
line source
-- -- pgTAP test script for ISRS location code types and functions -- SELECT results_eq($$ SELECT isrs_fromText('DEXXX039000000005023') $$, $$ SELECT CAST(('DE', 'XXX', '03900', '00000', 5023) AS isrs) $$, 'Correct ISRS text input gives respective ISRS location code'); SELECT throws_ok($$ SELECT isrs_fromText('DEUXXX039000000005023') $$, 22023, NULL, 'ISRS text input needs to have correct length');