~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to Perl-RPM/t/04_utils.t

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
 
 
3
# Test the basic util functions
 
4
 
 
5
use RPM;
 
6
 
 
7
print "1..2\n";
 
8
 
 
9
$arch = $os = '';
 
10
 
 
11
open(PIPE, "rpm --showrc |");
 
12
while (defined($line = <PIPE>))
 
13
{
 
14
    chomp $line;
 
15
 
 
16
    $line =~ /^build arch\s*:\s*(\S+)\s*$/ and $arch = $1;
 
17
    $line =~ /^build os\s*:\s*(\S+)\s*$/ and $os = $1;
 
18
}
 
19
close(PIPE);
 
20
 
 
21
print 'not ' unless ($arch eq rpm_archname);
 
22
print "ok 1\n";
 
23
 
 
24
print 'not ' unless ($os eq rpm_osname);
 
25
print "ok 2\n";
 
26
 
 
27
exit;