From: Vincent Pit Date: Mon, 4 Aug 2008 23:11:56 +0000 (+0200) Subject: Test some filestat operators X-Git-Tag: v0.02~10 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=24e9267d88e3b5d49961e061b974562c55876c4d;p=perl%2Fmodules%2FSub-Nary.git Test some filestat operators --- diff --git a/t/20-return.t b/t/20-return.t index 7ba7a74..0f9cff6 100644 --- a/t/20-return.t +++ b/t/20-return.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 52; +use Test::More tests => 53; use Sub::Nary; @@ -73,6 +73,8 @@ my @tests = ( [ sub { return <$x> }, 'list' ], + [ sub { return -f $0, -r $0 }, 2 ], + [ sub { return stat $0 }, 13 ], [ sub { return caller 0 }, sub { my @a = caller 0; scalar @a }->() ], [ sub { return localtime }, do { my @a = localtime; scalar @a } ], diff --git a/t/21-list.t b/t/21-list.t index 56c06f3..af3af50 100644 --- a/t/21-list.t +++ b/t/21-list.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 38; +use Test::More tests => 39; use Sub::Nary; @@ -61,6 +61,8 @@ my @tests = ( [ sub { <$x> }, 'list' ], + [ sub { -f $0, -r $0 }, 2 ], + [ sub { stat $0 }, 13 ], [ sub { caller 0 }, sub { my @a = caller 0; scalar @a }->() ], [ sub { localtime }, do { my @a = localtime; scalar @a } ],