From: Graham Knop Date: Mon, 13 Jan 2014 15:12:39 +0000 (-0500) Subject: test warning on directory creation X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa345cc9f401f5695ac8da70868b8f61ee30f1c7;p=p5sagit%2Flocal-lib.git test warning on directory creation --- diff --git a/t/classmethod.t b/t/classmethod.t index c066ca1..6c001b7 100644 --- a/t/classmethod.t +++ b/t/classmethod.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 4;; +use Test::More tests => 5; use File::Temp; use local::lib (); @@ -19,7 +19,10 @@ my $c = 'local::lib'; } { + my $warn = ''; + local $SIG{__WARN__} = sub { $warn .= $_[0] }; my $dir = File::Temp::tempdir(); $c->ensure_dir_structure_for("$dir/splat"); ok(-d "$dir/splat"); + like($warn, qr/^Attempting to create directory/); }