From b1c83fb0b6057f9ceb2caf895c7bdea2d159978e Mon Sep 17 00:00:00 2001 From: nanardon Date: Thu, 1 Mar 2007 00:11:13 +0000 Subject: - 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 --- RPM4/src/RPM4.xs | 2 +- RPM4/t/07files.t | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'RPM4') 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"); -- cgit v1.2.1