Changeset 17620
- Timestamp:
- May 9, 2008, 3:15:13 PM (18 years ago)
- Location:
- trunk/Nebulous-Server
- Files:
-
- 3 edited
-
Changes (modified) (1 diff)
-
lib/Nebulous/Server.pm (modified) (2 diffs)
-
t/14_server_xattr.t (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous-Server/Changes
r17546 r17620 2 2 3 3 0.10 4 - change listxattr_object() to return an arrayref 4 5 - change default log level to 'WARN' 5 6 - fix _is_valid_object_key() to handle nebulous keys -
trunk/Nebulous-Server/lib/Nebulous/Server.pm
r17544 r17620 1 1 # Copyright (c) 2004-2008 Joshua Hoblitt 2 2 # 3 # $Id: Server.pm,v 1.6 5 2008-05-06 23:07:27jhoblitt Exp $3 # $Id: Server.pm,v 1.66 2008-05-10 01:15:13 jhoblitt Exp $ 4 4 5 5 package Nebulous::Server; … … 794 794 $log->debug("leaving"); 795 795 796 return @xattrs;796 return \@xattrs; 797 797 } 798 798 -
trunk/Nebulous-Server/t/14_server_xattr.t
r17072 r17620 3 3 # Copryight (C) 2007 Joshua Hoblitt 4 4 # 5 # $Id: 14_server_xattr.t,v 1. 4 2008-03-20 21:10:14jhoblitt Exp $5 # $Id: 14_server_xattr.t,v 1.5 2008-05-10 01:11:58 jhoblitt Exp $ 6 6 7 7 use strict; … … 30 30 ok($neb->setxattr_object('foo', 'bar', 'baz', 'create'), 'set object xattr'); 31 31 { 32 my @xattrs = $neb->listxattr_object('foo');32 my $xattrs = $neb->listxattr_object('foo'); 33 33 is(scalar @xattrs, 1, 'number of xattrs'); 34 is( $xattrs[0], 'bar', 'xattr name');34 is(@$xattrs[0], 'bar', 'xattr name'); 35 35 } 36 36 … … 40 40 ok($neb->removexattr_object('foo', 'bar'), "remove object xattr"); 41 41 { 42 my @xattrs = $neb->listxattr_object('foo');43 is(scalar @ xattrs, 0, 'number of xattrs');42 my $xattrs = $neb->listxattr_object('foo'); 43 is(scalar @$xattrs, 0, 'number of xattrs'); 44 44 } 45 45 } … … 56 56 57 57 { 58 my @xattrs = $neb->listxattr_object('foo');59 is(scalar @ xattrs, 2, 'number of xattrs');60 is( $xattrs[0], 'bar', 'xattr name');61 is( $xattrs[1], 'bonk', 'xattr name');58 my $xattrs = $neb->listxattr_object('foo'); 59 is(scalar @$xattrs, 2, 'number of xattrs'); 60 is(@$xattrs[0], 'bar', 'xattr name'); 61 is(@$xattrs[1], 'bonk', 'xattr name'); 62 62 } 63 63 … … 70 70 ok($neb->removexattr_object('foo', 'bonk'), "remove object xattr"); 71 71 { 72 my @xattrs = $neb->listxattr_object('foo');73 is(scalar @ xattrs, 0, 'number of xattrs');72 my $xattrs = $neb->listxattr_object('foo'); 73 is(scalar @$xattrs, 0, 'number of xattrs'); 74 74 } 75 75 } … … 86 86 87 87 { 88 my @xattrs = $neb->listxattr_object('foo');89 is(scalar @ xattrs, 1, 'number of xattrs');90 is( $xattrs[0], 'bar', 'xattr name');88 my $xattrs = $neb->listxattr_object('foo'); 89 is(scalar @$xattrs, 1, 'number of xattrs'); 90 is(@$xattrs[0], 'bar', 'xattr name'); 91 91 } 92 92 … … 96 96 ok($neb->removexattr_object('foo', 'bar'), "remove object xattr"); 97 97 { 98 my @xattrs = $neb->listxattr_object('foo');99 is(scalar @ xattrs, 0, 'number of xattrs');98 my $xattrs = $neb->listxattr_object('foo'); 99 is(scalar @$xattrs, 0, 'number of xattrs'); 100 100 } 101 101 }
Note:
See TracChangeset
for help on using the changeset viewer.
