/[wait]/branches/unido/t/database.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /branches/unido/t/database.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (show annotations)
Tue Jul 13 12:22:09 2004 UTC (19 years, 9 months ago) by dpavlin
File MIME type: application/x-troff
File size: 2012 byte(s)
Changes made by Andreas J. Koenig <andreas.koenig(at)anima.de> for Unido project

1 # -*- Mode: Perl -*-
2 # database.t --
3 # ITIID : $ITI$ $Header $__Header$
4 # Author : Ulrich Pfeifer
5 # Created On : Thu Aug 8 12:14:23 1996
6 # Last Modified By: Ulrich Pfeifer
7 # Last Modified On: Sun Nov 22 18:44:33 1998
8 # Language : CPerl
9 # Update Count : 16
10 # Status : Unknown, Use with caution!
11 #
12 # Copyright (c) 1996-1997, Ulrich Pfeifer
13 #
14
15 ######################### We start with some black magic to print on failure.
16
17 BEGIN { $| = 1; print "1..13\n"; }
18 END {print "not ok 1\n" unless $loaded;}
19 #use diagnostics;
20 use WAIT::Database;
21 $loaded = 1;
22 print "ok 1\n";
23
24 ######################### End of black magic.
25
26 # Insert your test code below (better if it prints "ok 13"
27 # (correspondingly "not ok 13") depending on the success of chunk 13
28 # of the test code):
29
30 $test = 2;
31
32 $db = create WAIT::Database name => 'test';
33
34 print ((defined $db)? "ok $test\n" : "not ok $test\n"); $test++;
35
36 $status = $db->close();
37
38 print (($status)? "ok $test\n" : "not ok $test\n"); $test++;
39
40 print ((!defined $db)? "ok $test\n" : "not ok $test\n"); $test++;
41
42 $db = WAIT::Database->open(name => 'test');
43
44 print ((defined $db)? "ok $test\n" : "not ok $test\n"); $test++;
45
46 $db->sync;
47 print "ok $test\n"; $test++;
48
49 undef $self; # perl -w
50 undef $WAIT::Database::self; # perl -w
51 print ((!defined $self)? "ok $test\n" : "not ok $test\n"); $test++;
52 print ((!defined $WAIT::Database::self)? "ok $test\n" : "not ok $test\n"); $test++;
53
54 $status = $db->dispose;
55
56 print (($status)? "ok $test\n" : "not ok $test\n"); $test++;
57 print ((!defined $db)? "ok $test\n" : "not ok $test\n"); $test++;
58
59 {my $db = WAIT::Database->create(name => 'test'); $db->close()}
60 print ((!defined $db)? "ok $test\n" : "not ok $test\n"); $test++;
61
62 $status = WAIT::Database->dispose(name => 'test');
63 print (($status)? "ok $test\n" : "not ok $test\n"); $test++;
64
65 $db = WAIT::Database->open(name => 'test');
66 print ((!defined $db)? "ok $test\n" : "not ok $test\n"); $test++;

  ViewVC Help
Powered by ViewVC 1.1.26