/[fuse.before_github]/perl-llin/test/getdir.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

Contents of /perl-llin/test/getdir.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 21 - (show annotations)
Mon Jan 2 19:50:33 2006 UTC (18 years, 3 months ago) by dpavlin
File MIME type: application/x-troff
File size: 882 byte(s)
working copy
1 #!/usr/bin/perl
2 use test::helper qw($_real $_point);
3 use Test::More;
4 my (@names) = qw(abc def ghi jkl mno pqr stu jlk sfdaljk sdfakjlsdfa kjldsf kjl;sdf akjl;asdf klj;asdf lkjsdflkjsdfkjlsdfakjsdfakjlsadfkjl;asdfklj;asdfkjl;asdfklj;asdfkjl;asdfkjlasdflkj;sadf);
5 @names = sort(@names);
6 plan tests => 2 * scalar @names;
7 chdir($_real);
8
9 # create entries
10 map { system("touch \"$_\"") } @names;
11
12 # make sure they exist in real dir
13 opendir(REAL,$_real);
14 my (@ents) = readdir(REAL);
15 closedir(REAL);
16 @ents = sort(@ents);
17 map {
18 shift(@ents) while($ents[0] eq '.' || $ents[0] eq '..');
19 is(shift(@ents),$_,"ent $_")
20 } @names;
21
22 # make sure they exist in fuse dir
23 opendir(POINT,$_point);
24 @ents = readdir(POINT);
25 closedir(POINT);
26 @ents = sort(@ents);
27 map {
28 shift(@ents) while($ents[0] eq '.' || $ents[0] eq '..');
29 is(shift(@ents),$_,"ent $_")
30 } @names;
31
32 # remove them
33 map { unlink } @names;

  ViewVC Help
Powered by ViewVC 1.1.26