Browse files

Test for returning Failure objects from PL/Perl6

  • Loading branch information...
1 parent 4c20d42 commit 767e473e243556c60e23f7577fee65bb02781ef3 @leto committed Sep 10, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 t/sql/plperl6.sql
View
6 t/sql/plperl6.sql
@@ -25,6 +25,10 @@ CREATE OR REPLACE FUNCTION test_mu() RETURNS void LANGUAGE plperl6 AS $$
{ Mu }
$$;
+CREATE OR REPLACE FUNCTION test_return_failure() RETURNS void LANGUAGE plperl6 AS $$
+{ Failure }
+$$;
+
CREATE OR REPLACE FUNCTION test_int_plperl6() RETURNS int LANGUAGE plperl6 AS $$
() { 42 }
$$;
@@ -196,6 +200,8 @@ 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');
+
-- Finish the tests and clean up.
SELECT * FROM finish();

0 comments on commit 767e473

Please sign in to comment.