[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2930] addons/1.3/base/trunk/t/41. 0-dbsetup-base-addons.t



Revision: 2930
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2930&view=rev
Author:   einhverfr
Date:     2010-03-01 04:12:15 +0000 (Mon, 01 Mar 2010)

Log Message:
-----------
Adding db setup test script

Added Paths:
-----------
    addons/1.3/base/trunk/t/41.0-dbsetup-base-addons.t

Added: addons/1.3/base/trunk/t/41.0-dbsetup-base-addons.t
===================================================================
--- addons/1.3/base/trunk/t/41.0-dbsetup-base-addons.t	                        (rev 0)
+++ addons/1.3/base/trunk/t/41.0-dbsetup-base-addons.t	2010-03-01 04:12:15 UTC (rev 2930)
@@ -0,0 +1,19 @@
+use Test::More;
+use strict;
+use DBI;
+
+my $temp = $ENV{TEMP} || '/tmp/';
+my $run_tests = 1;
+for my $evar (qw(LSMB_NEW_DB LSMB_TEST_DB PG_CONTRIB_DIR)){
+  if (!defined $ENV{$evar}){
+      $run_tests = 0;
+      plan skip_all => "$evar not set";
+  }
+}
+$ENV{PGDATABASE}=$ENV{LSMB_NEW_DB};
+
+if ($run_tests){
+    plan tests=> 1;
+}
+ok(open (PSQL, '-|', "psql -f sql/modules/Util.sql"), "Util.sql loaded");
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.