]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/t/regress/lp1629108_metarecord_constituent_result_reroute.pg
Fix quote nesting issue in TAP test
[working/Evergreen.git] / Open-ILS / src / sql / Pg / t / regress / lp1629108_metarecord_constituent_result_reroute.pg
1 -- Format the output for nice TAP.
2 \pset format unaligned
3 \pset tuples_only true
4 \pset pager
5
6 -- Revert all changes on failure.
7 \set ON_ERROR_ROLLBACK 1
8 \set ON_ERROR_STOP true
9 \set QUIET 1
10
11 -- Load the TAP functions.
12 BEGIN;
13
14 -- Plan the tests.
15 SELECT plan(2);
16
17 -- Now make sure that the a query against it doesn't break
18 PREPARE thrower AS select mmr_mra::varchar from unapi.mmr_mra
19 (240,'','',null::text[],'CONS',0,null::HSTORE,null::HSTORE,true,1);
20
21 SELECT performs_ok( 'thrower',250,'Generic check for unapi.mmr_mra breakage' ); 
22
23 -- Make sure that the function returns the new XML property source_list
24 SELECT is(  
25 (
26 select mmr_mra::varchar ~ 'source_list="24[234],24[234],24[234]"'
27 from unapi.mmr_mra
28 (240,'','',null::text[],'CONS',0,null::HSTORE,null::HSTORE,true,1)
29 ), true, 'unapi.mmr_mra results have source_list="242,243,244sfaf"' );
30
31
32 -- Finish the tests and clean up.
33 SELECT * FROM finish();
34 ROLLBACK;