Use the .pg extension
authorJason Etheridge <jason@esilibrary.com>
Mon, 24 Jun 2013 20:07:44 +0000 (16:07 -0400)
committerMike Rylander <mrylander@gmail.com>
Thu, 1 Aug 2013 15:34:22 +0000 (11:34 -0400)
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s [deleted file]
Open-ILS/src/sql/Pg/t/dewey.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/t/dewey.s [deleted file]
Open-ILS/src/sql/Pg/t/schema.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/t/schema.s [deleted file]
Open-ILS/src/sql/Pg/t/versions.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/t/versions.s [deleted file]

diff --git a/Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg b/Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.pg
new file mode 100644 (file)
index 0000000..8855937
--- /dev/null
@@ -0,0 +1,47 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(4);
+
+-- Run the tests.
+
+SELECT col_is_null(
+    'actor',
+    'usr_address',
+    'state',
+    'actor.usr_address.state does not have the NOT NULL constraint'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.require$$',
+    'ui.patron.edit.au.state.require exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.show$$',
+    'ui.patron.edit.au.state.show exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.suggest$$',
+    'ui.patron.edit.au.state.suggest exists'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s b/Open-ILS/src/sql/Pg/t/0799.state_field_required_toggle.s
deleted file mode 100644 (file)
index 8855937..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-\set ECHO
-\set QUIET 1
--- Turn off echo and keep things quiet.
-
--- Format the output for nice TAP.
-\pset format unaligned
-\pset tuples_only true
-\pset pager
-
--- Revert all changes on failure.
-\set ON_ERROR_ROLLBACK 1
-\set ON_ERROR_STOP true
-\set QUIET 1
-
--- Load the TAP functions.
-BEGIN;
-
--- Plan the tests.
-SELECT plan(4);
-
--- Run the tests.
-
-SELECT col_is_null(
-    'actor',
-    'usr_address',
-    'state',
-    'actor.usr_address.state does not have the NOT NULL constraint'
-);
-
-SELECT isnt_empty(
-    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.require$$',
-    'ui.patron.edit.au.state.require exists'
-);
-
-SELECT isnt_empty(
-    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.show$$',
-    'ui.patron.edit.au.state.show exists'
-);
-
-SELECT isnt_empty(
-    'SELECT * FROM config.org_unit_setting_type WHERE name = $$ui.patron.edit.au.state.suggest$$',
-    'ui.patron.edit.au.state.suggest exists'
-);
-
--- Finish the tests and clean up.
-SELECT * FROM finish();
-ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/dewey.pg b/Open-ILS/src/sql/Pg/t/dewey.pg
new file mode 100644 (file)
index 0000000..50f42ba
--- /dev/null
@@ -0,0 +1,67 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(6);
+
+-- Run the tests.  Converted from Koha's ClassSortRoutine_Dewey.t
+
+SELECT is(
+    asset.label_normalizer_dewey(NULL),
+    '',
+    'testing whitespace'
+);
+
+SELECT is(
+    asset.label_normalizer_dewey('.... .....'),
+    '',
+    'testing fullstops'
+);
+
+-- I think these tests below may be looking too deeply into the implementation,
+-- but including them for now
+
+SELECT is(
+    asset.label_normalizer_dewey('123 456'),
+    '123_456000000000000',
+    'testing numbers'
+);
+
+SELECT is(
+    asset.label_normalizer_dewey('abc123 456'),
+    'ABC_123_456000000000000',
+    'testing alphanumeric'
+);
+
+SELECT is(
+    asset.label_normalizer_dewey('ab         c123 45   6'),
+    'AB_C123_45_600000000000000',
+    'testing middle whitespace'
+);
+
+SELECT todo('Desired behavior in contention.  See https://bugs.launchpad.net/evergreen/+bug/1150939', 1);
+
+SELECT cmp_ok(
+    asset.label_normalizer_dewey('YR DVD 800.1'),
+    '<',
+    asset.label_normalizer_dewey('YR DVD 900'),
+    'testing prefix plus decimal'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/dewey.s b/Open-ILS/src/sql/Pg/t/dewey.s
deleted file mode 100644 (file)
index 50f42ba..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-\set ECHO
-\set QUIET 1
--- Turn off echo and keep things quiet.
-
--- Format the output for nice TAP.
-\pset format unaligned
-\pset tuples_only true
-\pset pager
-
--- Revert all changes on failure.
-\set ON_ERROR_ROLLBACK 1
-\set ON_ERROR_STOP true
-\set QUIET 1
-
--- Load the TAP functions.
-BEGIN;
-
--- Plan the tests.
-SELECT plan(6);
-
--- Run the tests.  Converted from Koha's ClassSortRoutine_Dewey.t
-
-SELECT is(
-    asset.label_normalizer_dewey(NULL),
-    '',
-    'testing whitespace'
-);
-
-SELECT is(
-    asset.label_normalizer_dewey('.... .....'),
-    '',
-    'testing fullstops'
-);
-
--- I think these tests below may be looking too deeply into the implementation,
--- but including them for now
-
-SELECT is(
-    asset.label_normalizer_dewey('123 456'),
-    '123_456000000000000',
-    'testing numbers'
-);
-
-SELECT is(
-    asset.label_normalizer_dewey('abc123 456'),
-    'ABC_123_456000000000000',
-    'testing alphanumeric'
-);
-
-SELECT is(
-    asset.label_normalizer_dewey('ab         c123 45   6'),
-    'AB_C123_45_600000000000000',
-    'testing middle whitespace'
-);
-
-SELECT todo('Desired behavior in contention.  See https://bugs.launchpad.net/evergreen/+bug/1150939', 1);
-
-SELECT cmp_ok(
-    asset.label_normalizer_dewey('YR DVD 800.1'),
-    '<',
-    asset.label_normalizer_dewey('YR DVD 900'),
-    'testing prefix plus decimal'
-);
-
--- Finish the tests and clean up.
-SELECT * FROM finish();
-ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/schema.pg b/Open-ILS/src/sql/Pg/t/schema.pg
new file mode 100644 (file)
index 0000000..7d4feca
--- /dev/null
@@ -0,0 +1,52 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(27);
+
+-- Run the tests.
+SELECT has_schema('action','Has action schema'); 
+SELECT has_schema('action_trigger','Has action_trigger schema'); 
+SELECT has_schema('actor','Has actor schema');
+SELECT has_schema('acq','Has acq schema'); 
+SELECT has_schema('asset','Has actor schema');
+SELECT has_schema('auditor','Has auditor schema'); 
+SELECT has_schema('authority','Has authority schema'); 
+SELECT has_schema('biblio','Has biblio schema'); 
+SELECT has_schema('booking','Has booking schema'); 
+SELECT has_schema('config','Has config schema'); 
+SELECT has_schema('container','Has container schema'); 
+SELECT has_schema('evergreen','Has evergreen schema'); 
+SELECT has_schema('extend_reporter','Has extend_reporter schema'); 
+SELECT has_schema('metabib','Has metabib schema'); 
+SELECT has_schema('money','Has money schema'); 
+SELECT has_schema('offline','Has offline schema'); 
+SELECT has_schema('permission','Has permission schema'); 
+SELECT has_schema('public','Has public schema'); 
+SELECT has_schema('query','Has query schema'); 
+SELECT has_schema('reporter','Has reporter schema'); 
+SELECT has_schema('search','Has search schema'); 
+SELECT has_schema('serial','Has serial schema'); 
+SELECT has_schema('staging','Has staging schema'); 
+SELECT has_schema('stats','Has stats schema'); 
+SELECT has_schema('url_verify','Has url_verify schema'); 
+SELECT has_schema('vandelay','Has vandelay schema'); 
+SELECT has_schema('unapi','Has unapi schema'); 
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/schema.s b/Open-ILS/src/sql/Pg/t/schema.s
deleted file mode 100644 (file)
index 7d4feca..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-\set ECHO
-\set QUIET 1
--- Turn off echo and keep things quiet.
-
--- Format the output for nice TAP.
-\pset format unaligned
-\pset tuples_only true
-\pset pager
-
--- Revert all changes on failure.
-\set ON_ERROR_ROLLBACK 1
-\set ON_ERROR_STOP true
-\set QUIET 1
-
--- Load the TAP functions.
-BEGIN;
-
--- Plan the tests.
-SELECT plan(27);
-
--- Run the tests.
-SELECT has_schema('action','Has action schema'); 
-SELECT has_schema('action_trigger','Has action_trigger schema'); 
-SELECT has_schema('actor','Has actor schema');
-SELECT has_schema('acq','Has acq schema'); 
-SELECT has_schema('asset','Has actor schema');
-SELECT has_schema('auditor','Has auditor schema'); 
-SELECT has_schema('authority','Has authority schema'); 
-SELECT has_schema('biblio','Has biblio schema'); 
-SELECT has_schema('booking','Has booking schema'); 
-SELECT has_schema('config','Has config schema'); 
-SELECT has_schema('container','Has container schema'); 
-SELECT has_schema('evergreen','Has evergreen schema'); 
-SELECT has_schema('extend_reporter','Has extend_reporter schema'); 
-SELECT has_schema('metabib','Has metabib schema'); 
-SELECT has_schema('money','Has money schema'); 
-SELECT has_schema('offline','Has offline schema'); 
-SELECT has_schema('permission','Has permission schema'); 
-SELECT has_schema('public','Has public schema'); 
-SELECT has_schema('query','Has query schema'); 
-SELECT has_schema('reporter','Has reporter schema'); 
-SELECT has_schema('search','Has search schema'); 
-SELECT has_schema('serial','Has serial schema'); 
-SELECT has_schema('staging','Has staging schema'); 
-SELECT has_schema('stats','Has stats schema'); 
-SELECT has_schema('url_verify','Has url_verify schema'); 
-SELECT has_schema('vandelay','Has vandelay schema'); 
-SELECT has_schema('unapi','Has unapi schema'); 
-
--- Finish the tests and clean up.
-SELECT * FROM finish();
-ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/versions.pg b/Open-ILS/src/sql/Pg/t/versions.pg
new file mode 100644 (file)
index 0000000..b611cbc
--- /dev/null
@@ -0,0 +1,35 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(2);
+
+-- Run the tests.
+
+SELECT CASE WHEN pg_version_num() >= 90000
+    THEN pass('Running PostgreSQL 9+')
+    ELSE fail('Not running PostgreSQL 9+')
+END;
+
+SELECT isnt_empty(
+    'SELECT COUNT(*) FROM config.upgrade_log',
+    'Have rows in config.upgrade_log'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;
diff --git a/Open-ILS/src/sql/Pg/t/versions.s b/Open-ILS/src/sql/Pg/t/versions.s
deleted file mode 100644 (file)
index b611cbc..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-\set ECHO
-\set QUIET 1
--- Turn off echo and keep things quiet.
-
--- Format the output for nice TAP.
-\pset format unaligned
-\pset tuples_only true
-\pset pager
-
--- Revert all changes on failure.
-\set ON_ERROR_ROLLBACK 1
-\set ON_ERROR_STOP true
-\set QUIET 1
-
--- Load the TAP functions.
-BEGIN;
-
--- Plan the tests.
-SELECT plan(2);
-
--- Run the tests.
-
-SELECT CASE WHEN pg_version_num() >= 90000
-    THEN pass('Running PostgreSQL 9+')
-    ELSE fail('Not running PostgreSQL 9+')
-END;
-
-SELECT isnt_empty(
-    'SELECT COUNT(*) FROM config.upgrade_log',
-    'Have rows in config.upgrade_log'
-);
-
--- Finish the tests and clean up.
-SELECT * FROM finish();
-ROLLBACK;