#!/usr/bin/perl
# Test the basic util functions
use
RPM;
"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);
'not '
unless
(
$arch
eq rpm_archname);
"ok 1\n"
;
'not '
unless
(
$os
eq rpm_osname);
"ok 2\n"
;
exit
;