File: 05_autoinit.t

package info (click to toggle)
libapt-pkg-perl 0.1.20
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 240 kB
  • ctags: 100
  • sloc: perl: 1,072; ansic: 198; makefile: 39
file content (29 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/perl

# $Id: 05_autoinit.t,v 1.1 2003-06-09 12:26:56 bod Exp $
# AptPkg::Cache auto-init test

BEGIN { print "1..3\n" }

use AptPkg::Cache;

if (my $cache = AptPkg::Cache->new)
{
    print "ok 1\n";
    if (my $apt = $cache->{apt})
    {
        print "ok 2\n";
        print 'not ' unless $apt->{Name} eq 'apt'; print "ok 3\n";
    }
    else
    {
        print "not ok 2\n";
        print "ok 3 # skip\n";
    }
}
else
{
    print "not ok 1\n";
    print "ok $_ # skip\n" for 2..3;
}