/[fuse.before_github]/perl-llin/test/chown.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /perl-llin/test/chown.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21 - (hide annotations)
Mon Jan 2 19:50:33 2006 UTC (18 years, 3 months ago) by dpavlin
File MIME type: application/x-troff
File size: 449 byte(s)
working copy
1 mszeredi 4 #!/usr/bin/perl
2     use test::helper qw($_real $_point);
3     use Test::More;
4 dpavlin 10 use English;
5 mszeredi 4 plan tests => 4;
6 dpavlin 10
7 mszeredi 4 my (@stat);
8     chdir($_point);
9     system("echo frog >file");
10 dpavlin 10
11     SKIP: {
12     skip('Need root to give away ownership', 4) unless ($UID == 0);
13    
14     ok(chown(0,0,"file"),"set 0,0");
15     @stat = stat("file");
16     ok($stat[4] == 0 && $stat[5] == 0,"0,0");
17     ok(chown(1,1,"file"),"set 1,1");
18     @stat = stat("file");
19     ok($stat[4] == 1 && $stat[5] == 1,"1,1");
20     }
21    
22 mszeredi 4 unlink("file");

  ViewVC Help
Powered by ViewVC 1.1.26