diff options
author | rjray <devnull@localhost> | 2000-05-27 03:56:38 +0000 |
---|---|---|
committer | rjray <devnull@localhost> | 2000-05-27 03:56:38 +0000 |
commit | 0b06485803a9d3c6a993ff3830970278795fd695 (patch) | |
tree | 9b1d3496abb8b961b59bf20620689d0eae216730 | |
parent | ccd9711a024fa725e24e42de5e3becada817f908 (diff) | |
download | librpm-tizen-0b06485803a9d3c6a993ff3830970278795fd695.tar.gz librpm-tizen-0b06485803a9d3c6a993ff3830970278795fd695.tar.bz2 librpm-tizen-0b06485803a9d3c6a993ff3830970278795fd695.zip |
test suite for the utils in RPM.pm
CVS patchset: 3759
CVS date: 2000/05/27 03:56:38
-rwxr-xr-x | Perl-RPM/t/04_utils.t | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Perl-RPM/t/04_utils.t b/Perl-RPM/t/04_utils.t new file mode 100755 index 000000000..751f5687e --- /dev/null +++ b/Perl-RPM/t/04_utils.t @@ -0,0 +1,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 GetArchName); +print "ok 1\n"; + +print 'not ' unless ($os eq GetOsName); +print "ok 2\n"; + +exit; |