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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 119 - (show annotations)
Sun Mar 16 13:34:34 2008 UTC (16 years, 1 month ago) by dpavlin
File MIME type: application/x-troff
File size: 1448 byte(s)
expose and fix 2Gb file bug, RT #32639, RT #33903
1 #!/usr/bin/perl
2 use test::helper qw($_real $_point);
3 use Test::More;
4 use Data::Dumper;
5 plan tests => 29;
6 my ($a, $b) = ("$_real/wibble","$_point/wibble");
7 # create 3G file to expose 2G bug
8 open(my $fh, '>', $a) || die "can't open $b: $!";
9 seek($fh, 3 * 1024 * 1024 * 1024, 0);
10 print $fh ' ';
11 close($fh);
12 diag "size $b = ",-s $b;
13 is(-A "$a", -A "$b", '-A'); # 1
14 is(-B "$a", -B "$b", '-B'); # 2
15 is(-C "$a", -C "$b", '-C'); # 3
16 is(-M "$a", -M "$b", '-M'); # 4
17 is(-O "$a", -O "$b", '-O'); # 5
18 is(-R "$a", -R "$b", '-R'); # 6
19 is(-S "$a", -S "$b", '-S'); # 7
20 is(-T "$a", -T "$b", '-T'); # 8
21 is(-W "$a", -W "$b", '-W'); # 9
22 is(-X "$a", -X "$b", '-X'); # 10
23 is(-b "$a", -b "$b", '-b'); # 11
24 is(-c "$a", -c "$b", '-c'); # 12
25 is(-d "$a", -d "$b", '-d'); # 13
26 is(-e "$a", -e "$b", '-e'); # 14
27 is(-f "$a", -f "$b", '-f'); # 15
28 is(-g "$a", -g "$b", '-g'); # 16
29 is(-k "$a", -k "$b", '-k'); # 17
30 is(-l "$a", -l "$b", '-l'); # 18
31 is(-o "$a", -o "$b", '-o'); # 19
32 is(-p "$a", -p "$b", '-p'); # 20
33 is(-r "$a", -r "$b", '-r'); # 21
34 is(-s "$a", -s "$b", '-s'); # 22
35 is(-t "$a", -t "$b", '-t'); # 23
36 is(-u "$a", -u "$b", '-u'); # 24
37 is(-w "$a", -w "$b", '-w'); # 25
38 is(-x "$a", -x "$b", '-x'); # 26
39 is(-z "$a", -z "$b", '-z'); # 27
40 my (@astat, @bstat);
41 @astat = stat("$a");
42 @bstat = stat("$b");
43 # dev, inode and blksize can legally change
44 @astat = @astat[2..10,12];
45 @bstat = @bstat[2..10,12];
46 is(join(" ",@astat),join(" ",@bstat),"stat()");
47 ok( unlink($a), 'unlink' );

  ViewVC Help
Powered by ViewVC 1.1.26