summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2007-03-01 00:11:13 +0000
committernanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2007-03-01 00:11:13 +0000
commitb1c83fb0b6057f9ceb2caf895c7bdea2d159978e (patch)
tree73f6c9cb59a99b98f7902ccecf4d46666fd48a75
parente506e47fa2bdb6c8beb46f45612eca212463b0e4 (diff)
downloadperl-RPM4-b1c83fb0b6057f9ceb2caf895c7bdea2d159978e.tar
perl-RPM4-b1c83fb0b6057f9ceb2caf895c7bdea2d159978e.tar.gz
perl-RPM4-b1c83fb0b6057f9ceb2caf895c7bdea2d159978e.tar.bz2
perl-RPM4-b1c83fb0b6057f9ceb2caf895c7bdea2d159978e.tar.xz
perl-RPM4-b1c83fb0b6057f9ceb2caf895c7bdea2d159978e.zip
- fix #2, file mode is an unsigned value
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@123 971eb68f-4bfb-0310-8326-d2484c010a4c
-rw-r--r--RPM4/src/RPM4.xs2
-rw-r--r--RPM4/t/07files.t3
2 files changed, 3 insertions, 2 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index 81b4356..3c19947 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -2596,7 +2596,7 @@ void
Files_mode(Files)
rpmfi Files
PPCODE:
- XPUSHs(sv_2mortal(newSViv(rpmfiFMode(Files))));
+ XPUSHs(sv_2mortal(newSVuv(rpmfiFMode(Files))));
void
Files_md5(Files)
diff --git a/RPM4/t/07files.t b/RPM4/t/07files.t
index 8f8ea49..a85e3d6 100644
--- a/RPM4/t/07files.t
+++ b/RPM4/t/07files.t
@@ -1,7 +1,7 @@
# $Id$
use strict;
-use Test::More tests => 10;
+use Test::More tests => 11;
use FindBin qw($Bin);
use RPM4;
@@ -35,3 +35,4 @@ is(
);
ok(!defined($files->link()), "Can get Files::link()");
ok(defined($files->mode()), "Can get Files::mode()");
+ok($files->mode() > 0, "Files::mode() is positive value");