diff options
author | Mark Glines <mark@glines.org> | 2002-04-22 02:24:28 +0000 |
---|---|---|
committer | Mark Glines <mark@glines.org> | 2002-04-22 02:24:28 +0000 |
commit | 8811161f67657253d11214ede54857f810662a91 (patch) | |
tree | 1f555243af88b77fcea3d256f6f7b8b5f1c05548 /perl/test/getattr.t | |
parent | 7574b0559706597058a9cb3c056204935f9b00c5 (diff) | |
download | libfuse-8811161f67657253d11214ede54857f810662a91.tar.gz |
added a test framework
updated README
fixed a couple of bugs in loopback.pl
Diffstat (limited to 'perl/test/getattr.t')
-rw-r--r-- | perl/test/getattr.t | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/perl/test/getattr.t b/perl/test/getattr.t new file mode 100644 index 0000000..49eef14 --- /dev/null +++ b/perl/test/getattr.t @@ -0,0 +1,42 @@ +#!/usr/bin/perl +use test::helper qw($_real $_point); +use Test::More; +use Data::Dumper; +plan tests => 28; +my ($a, $b) = ("$_real/wibble","$_point/wibble"); +`touch $a; sleep 1; cat $a >/dev/null`; +is(-A "$a", -A "$b", '-A'); # 1 +is(-B "$a", -B "$b", '-B'); # 2 +is(-C "$a", -C "$b", '-C'); # 3 +is(-M "$a", -M "$b", '-M'); # 4 +is(-O "$a", -O "$b", '-O'); # 5 +is(-R "$a", -R "$b", '-R'); # 6 +is(-S "$a", -S "$b", '-S'); # 7 +is(-T "$a", -T "$b", '-T'); # 8 +is(-W "$a", -W "$b", '-W'); # 9 +is(-X "$a", -X "$b", '-X'); # 10 +is(-b "$a", -b "$b", '-b'); # 11 +is(-c "$a", -c "$b", '-c'); # 12 +is(-d "$a", -d "$b", '-d'); # 13 +is(-e "$a", -e "$b", '-e'); # 14 +is(-f "$a", -f "$b", '-f'); # 15 +is(-g "$a", -g "$b", '-g'); # 16 +is(-k "$a", -k "$b", '-k'); # 17 +is(-l "$a", -l "$b", '-l'); # 18 +is(-o "$a", -o "$b", '-o'); # 19 +is(-p "$a", -p "$b", '-p'); # 20 +is(-r "$a", -r "$b", '-r'); # 21 +is(-s "$a", -s "$b", '-s'); # 22 +is(-t "$a", -t "$b", '-t'); # 23 +is(-u "$a", -u "$b", '-u'); # 24 +is(-w "$a", -w "$b", '-w'); # 25 +is(-x "$a", -x "$b", '-x'); # 26 +is(-z "$a", -z "$b", '-z'); # 27 +my (@astat, @bstat); +@astat = stat("$a"); +@bstat = stat("$b"); +# dev and inode can legally change +shift(@astat); shift(@astat); +shift(@bstat); shift(@bstat); +is(join(" ",@astat),join(" ",@bstat),"stat()"); +`rm -f $a`; |