File: 05_autoinit.t

package info (click to toggle)
libapt-pkg-perl 0.1.43
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: perl: 1,285; ansic: 201; makefile: 3
file content (27 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (7)
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
#!/usr/bin/perl

# 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;
}