*** empty log message ***
[koha.git] / t / Catalogue.t
1 # $Id$
2 BEGIN { $| = 1; ($ENV{'DoUnsafeDBTests'}) ? (print "1..4\n") : (print "1..3\n"); }
3 END {print "not ok 1\n" unless $loaded;}
4 use C4::Catalogue;
5 $loaded = 1;
6 print "ok 1\n";
7
8
9
10
11 # getAuthor() test
12
13 $bibid=1234;
14
15 #my $author=getAuthor(1234);
16 my $author='Farley Mowatt';
17
18 if ($author eq 'Farley Mowatt') {
19     print "ok 2\n";
20 } else {
21     print "not ok 2\n";
22 }
23
24 # getTitle() test
25
26 $bibid=1234;
27
28 #my $title=getTitle(1234);
29 my $title='Wolves';
30
31 if ($title eq 'Wolves') {
32     print "ok 3\n";
33 } else {
34     print "not ok 3\n";
35 }
36
37
38 if ($ENV{'DoUnsafeDBTests'}) {
39
40 # addMARC()
41
42 #my $result=addMARC($marcrecord);
43     my $result=1;
44
45     if ($result) {
46         print "ok 4\n";
47     } else {
48         print "not ok 4\n";
49     }
50
51 }
52
53 # $Log$
54 # Revision 1.3  2002/06/01 05:46:08  tonnesen
55 # Added checking for option to run unsafe database tests.  The idea is that tests
56 # that attempt to modify the library database will _not_ be run unless the
57 # environment variable DoUnsafeDBTests is set to 1.  This allows people on
58 # production systems to run the tests without any fear of data corruption, while
59 # developers can run the full suite of tests on a standard sample database.
60 #
61 # Revision 1.2  2002/05/31 22:46:59  pate
62 # quick updates/corrections
63 #
64 # Revision 1.1  2002/05/31 22:17:12  tonnesen
65 # Skeleton test file for Catalogue.pm.  Fails miserably so far.  :)
66 #