[open-ils-commits] [GIT] Evergreen ILS branch master updated. 1c3ba718a31c53fe4e14d0d3566e9db95a32d8e2

Evergreen Git git at git.evergreen-ils.org
Wed Nov 11 20:40:59 EST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  1c3ba718a31c53fe4e14d0d3566e9db95a32d8e2 (commit)
      from  e2f1b537cd69025461710c70a32b522af7dc81b2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1c3ba718a31c53fe4e14d0d3566e9db95a32d8e2
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri Aug 14 11:17:55 2015 -0400

    LP#1483508 PGTAP tests for text_concat / agg_text
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/sql/Pg/t/text_concat.pg b/Open-ILS/src/sql/Pg/t/text_concat.pg
new file mode 100644
index 0000000..bcbd7ac
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/t/text_concat.pg
@@ -0,0 +1,31 @@
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(6);
+
+SELECT is(public.text_concat('foo','bar'), 'foo bar', '2 Strings');
+SELECT is(public.text_concat('åbçdéñœöîøæ', 'ÇıÂÅÍÎÏÔÔÒÚÆŒè'), 
+    'åbçdéñœöîøæ ÇıÂÅÍÎÏÔÔÒÚÆŒè', '2 More Strings');
+SELECT is(public.text_concat('foo',NULL), 'foo', 'string + NULL');
+SELECT is(public.text_concat(NULL, 'bar'), 'bar', 'NULL + string');
+SELECT is(public.text_concat(NULL, NULL), NULL, 'NULL + NULL');
+
+-- test aggregate use
+
+INSERT INTO config.billing_type (name, owner, default_price) VALUES
+('pgtap 1', 1, DEFAULT),
+('pgtap 2', 1, '3.34'),
+('pgtap 3', 1, '4.56');
+
+SELECT is(
+    (SELECT agg_text(subq.default_price::text) FROM 
+        (SELECT * FROM config.billing_type 
+            WHERE name ~ 'pgtap' ORDER BY name) subq),
+    '3.34 4.56',
+    'agg_text() aggregates some text'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/sql/Pg/t/text_concat.pg |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/t/text_concat.pg


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list