Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a test for returning an Exception object; coredumps postgres

  • Loading branch information...
commit ec5efb96a8bd14262d5b5d4eef53b73a4c3bca4a 1 parent 767e473
@leto authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 t/sql/plperl6.sql
View
7 t/sql/plperl6.sql
@@ -15,7 +15,7 @@ BEGIN;
\i plparrot.sql
-- Plan the tests.
-SELECT plan(29);
+SELECT plan(31);
CREATE OR REPLACE FUNCTION test_void_plperl6() RETURNS void LANGUAGE plperl6 AS $$
{ Nil }
@@ -29,6 +29,10 @@ CREATE OR REPLACE FUNCTION test_return_failure() RETURNS void LANGUAGE plperl6 A
{ Failure }
$$;
+CREATE OR REPLACE FUNCTION test_return_exception() RETURNS text LANGUAGE plperl6 AS $$
+{ Exception }
+$$;
+
CREATE OR REPLACE FUNCTION test_int_plperl6() RETURNS int LANGUAGE plperl6 AS $$
() { 42 }
$$;
@@ -201,6 +205,7 @@ select is(test_global_grammar(''), 0, 'empty string should not parse in the glob
SELECT language_is_trusted( 'plperl6', 'PL/Perl6 should be trusted' );
select is(test_return_failure()::text,'', 'Return Failure from PL/Perl6');
+select is(test_return_exception()::text,'', 'Return Exception from PL/Perl6');
-- Finish the tests and clean up.
SELECT * FROM finish();
Please sign in to comment.
Something went wrong with that request. Please try again.