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

SF.net SVN: ledger-smb:[2928] trunk/t/40-dbsetup.t



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

Log Message:
-----------
Fixing db setup tests for Pg 8.4, adding -E UTF8 to command line

Modified Paths:
--------------
    trunk/t/40-dbsetup.t

Modified: trunk/t/40-dbsetup.t
===================================================================
--- trunk/t/40-dbsetup.t	2010-03-01 01:35:56 UTC (rev 2927)
+++ trunk/t/40-dbsetup.t	2010-03-01 03:46:57 UTC (rev 2928)
@@ -14,16 +14,13 @@
 }
 
 if ($run_tests){
-	plan tests => 29;
+	plan tests => 33;
 	$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
 }
 
 # Manual tests
-open (CREATEDB, '-|', 'createdb');
+ok(!system ('createdb -E UTF8'), 'Database Created 2') || BAIL_OUT('Database could not be created!');
 
-cmp_ok(<CREATEDB>, 'eq', "CREATE DATABASE\n", 'Database Created') 
-|| BAIL_OUT('Database could not be created!');
-
 close(CREATEDB);
 
 if (!$ENV{LSMB_INSTALL_DB}){
@@ -73,8 +70,7 @@
     $mod =~ s/\s*$//;
     next if $mod eq '';
 
-    (open (PSQL, '-|', "psql -f sql/modules/$mod")&& pass("$mod loaded"))
-      || fail("$mod loaded");
+    ok(open (PSQL, '-|', "psql -f sql/modules/$mod"), "$mod loaded");
     my $test = 0;
     while (my $line = <PSQL>){
         chomp($line);
@@ -139,7 +135,7 @@
       $sth->finish;
 };
 
-SKIP {
+SKIP: {
      skip 'No COA specified', 2 if !defined $ENV{LSMB_LOAD_COA};
      ok(open (PSQL, '-|', "psql -f sql/coa/".lc($ENV{LSMB_COUNTRY_CODE})
                                 ."/chart/$ENV{LSMB_LOAD_COA}.sql"), 
@@ -156,7 +152,7 @@
      ok($return, 'Chart file committed');
 }
 
-SKIP {
+SKIP: {
      skip 'No GIFI specified', 2 if !defined $ENV{LSMB_LOAD_GIFI};
      ok(open (PSQL, '-|', "psql -f sql/coa/".lc($ENV{LSMB_COUNTRY_CODE})
                                 ."/gifi/$ENV{LSMB_LOAD_GIFI}.sql"), 


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