summaryrefslogtreecommitdiff
path: root/Perl-RPM/t/04_utils.t
blob: 88c8be602248c4bfcd043cedd4a12e979e455ffc (plain)
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

# Test the basic util functions

use RPM;

print "1..2\n";

$arch = $os = '';

open(PIPE, "rpm --showrc |");
while (defined($line = <PIPE>))
{
    chomp $line;

    $line =~ /^build arch\s*:\s*(\S+)\s*$/ and $arch = $1;
    $line =~ /^build os\s*:\s*(\S+)\s*$/ and $os = $1;
}
close(PIPE);

print 'not ' unless ($arch eq rpm_archname);
print "ok 1\n";

print 'not ' unless ($os eq rpm_osname);
print "ok 2\n";

exit;