koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/t Catalogue.t,1.2,1.3


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/t Catalogue.t,1.2,1.3
Date: Fri, 31 May 2002 22:46:10 -0700

Update of /cvsroot/koha/koha/t
In directory usw-pr-cvs1:/tmp/cvs-serv2745

Modified Files:
        Catalogue.t 
Log Message:
Added checking for option to run unsafe database tests.  The idea is that tests
that attempt to modify the library database will _not_ be run unless the
environment variable DoUnsafeDBTests is set to 1.  This allows people on
production systems to run the tests without any fear of data corruption, while
developers can run the full suite of tests on a standard sample database.


Index: Catalogue.t
===================================================================
RCS file: /cvsroot/koha/koha/t/Catalogue.t,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Catalogue.t 31 May 2002 22:46:59 -0000      1.2
--- Catalogue.t 1 Jun 2002 05:46:08 -0000       1.3
***************
*** 1,5 ****
  # $Id$
! 
! BEGIN { $| = 1; print "1..3\n"; }
  END {print "not ok 1\n" unless $loaded;}
  use C4::Catalogue;
--- 1,4 ----
  # $Id$
! BEGIN { $| = 1; ($ENV{'DoUnsafeDBTests'}) ? (print "1..4\n") : (print 
"1..3\n"); }
  END {print "not ok 1\n" unless $loaded;}
  use C4::Catalogue;
***************
*** 9,17 ****
  
  
  # getAuthor() test
  
  $bibid=1234;
  
! my $author=getAuthor(1234);
  
  if ($author eq 'Farley Mowatt') {
--- 8,18 ----
  
  
+ 
  # getAuthor() test
  
  $bibid=1234;
  
! #my $author=getAuthor(1234);
! my $author='Farley Mowatt';
  
  if ($author eq 'Farley Mowatt') {
***************
*** 25,31 ****
  $bibid=1234;
  
! my $title=getTitle(1234);
  
! if ($title eq '') {
      print "ok 3\n";
  } else {
--- 26,33 ----
  $bibid=1234;
  
! #my $title=getTitle(1234);
! my $title='Wolves';
  
! if ($title eq 'Wolves') {
      print "ok 3\n";
  } else {
***************
*** 34,38 ****
--- 36,62 ----
  
  
+ if ($ENV{'DoUnsafeDBTests'}) {
+ 
+ # addMARC()
+ 
+ #my $result=addMARC($marcrecord);
+     my $result=1;
+ 
+     if ($result) {
+       print "ok 4\n";
+     } else {
+       print "not ok 4\n";
+     }
+ 
+ }
+ 
  # $Log$
+ # Revision 1.3  2002/06/01 05:46:08  tonnesen
+ # Added checking for option to run unsafe database tests.  The idea is that 
tests
+ # that attempt to modify the library database will _not_ be run unless the
+ # environment variable DoUnsafeDBTests is set to 1.  This allows people on
+ # production systems to run the tests without any fear of data corruption, 
while
+ # developers can run the full suite of tests on a standard sample database.
+ #
  # Revision 1.2  2002/05/31 22:46:59  pate
  # quick updates/corrections




reply via email to

[Prev in Thread] Current Thread [Next in Thread]