File: 01_system.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 (26 lines) | stat: -rw-r--r-- 537 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
#!/usr/bin/perl

# $Id: 01_system.t,v 1.2 2004-10-14 00:50:02 bod Exp $
# AptPkg::System tests

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

use AptPkg::Config '$_config';
use AptPkg::System '$_system';

print 'not ' unless $_config->init and $_system = $_config->system;
print "ok 1\n";

my $type;
$type ||= 'dpkg' if -f '/etc/debian_version';
$type ||= 'rpm'  if -f '/etc/redhat-release';
unless ($type)
{
    print "# unknown system type, defaulting to dpkg\n";
    $type = 'dpkg';
}

print 'not ' unless $_system->label =~ /$type/;
print "ok 2\n";

1;