/[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 4 - (show annotations)
Thu Nov 11 14:44:15 2004 UTC (19 years, 4 months ago) by mszeredi
Original Path: perl/trunk/test/getattr.t
File MIME type: application/x-troff
File size: 1267 byte(s)
Initial revision

1 #!/usr/bin/perl
2 use test::helper qw($_real $_point);
3 use Test::More;
4 use Data::Dumper;
5 plan tests => 28;
6 my ($a, $b) = ("$_real/wibble","$_point/wibble");
7 `touch $b`;
8 is(-A "$a", -A "$b", '-A'); # 1
9 is(-B "$a", -B "$b", '-B'); # 2
10 is(-C "$a", -C "$b", '-C'); # 3
11 is(-M "$a", -M "$b", '-M'); # 4
12 is(-O "$a", -O "$b", '-O'); # 5
13 is(-R "$a", -R "$b", '-R'); # 6
14 is(-S "$a", -S "$b", '-S'); # 7
15 is(-T "$a", -T "$b", '-T'); # 8
16 is(-W "$a", -W "$b", '-W'); # 9
17 is(-X "$a", -X "$b", '-X'); # 10
18 is(-b "$a", -b "$b", '-b'); # 11
19 is(-c "$a", -c "$b", '-c'); # 12
20 is(-d "$a", -d "$b", '-d'); # 13
21 is(-e "$a", -e "$b", '-e'); # 14
22 is(-f "$a", -f "$b", '-f'); # 15
23 is(-g "$a", -g "$b", '-g'); # 16
24 is(-k "$a", -k "$b", '-k'); # 17
25 is(-l "$a", -l "$b", '-l'); # 18
26 is(-o "$a", -o "$b", '-o'); # 19
27 is(-p "$a", -p "$b", '-p'); # 20
28 is(-r "$a", -r "$b", '-r'); # 21
29 is(-s "$a", -s "$b", '-s'); # 22
30 is(-t "$a", -t "$b", '-t'); # 23
31 is(-u "$a", -u "$b", '-u'); # 24
32 is(-w "$a", -w "$b", '-w'); # 25
33 is(-x "$a", -x "$b", '-x'); # 26
34 is(-z "$a", -z "$b", '-z'); # 27
35 my (@astat, @bstat);
36 @astat = stat("$a");
37 @bstat = stat("$b");
38 # dev and inode can legally change
39 shift(@astat); shift(@astat);
40 shift(@bstat); shift(@bstat);
41 is(join(" ",@astat),join(" ",@bstat),"stat()");
42 `rm -f $a`;

  ViewVC Help
Powered by ViewVC 1.1.26