X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F08multipart-suffix.t;fp=t%2F08multipart-suffix.t;h=367db05f99e3e130af836031dccb6870697ccea0;hb=23b5a50c502f7deffb8bf2ef5624537b80d952a0;hp=7374223032248b41b6f5eec6b45ade9fed3695ed;hpb=6a7b9183013650d6d0488a5cd84d4033b9a9768c;p=catagits%2FHTTP-Body.git diff --git a/t/08multipart-suffix.t b/t/08multipart-suffix.t index 7374223..367db05 100644 --- a/t/08multipart-suffix.t +++ b/t/08multipart-suffix.t @@ -6,7 +6,7 @@ use warnings; use FindBin; use lib "$FindBin::Bin/lib"; -use Test::More tests => 4; +use Test::More tests => 6; use Test::Deep; use Cwd; @@ -48,6 +48,16 @@ my $path = catdir( getcwd(), 't', 'data', 'multipart' ); $uploads->{upload}{tempname}, qr/\.foo\.txt$/, 'tempname preserves .foo.txt suffix' ); + + like( + $uploads->{upload2}{tempname}, qr/\.txt$/, + 'tempname preserves .txt suffix when dir name has .' + ); + + unlike( + $uploads->{upload2}{tempname}, qr/\\/, + 'tempname only gets extension from filename, not from a directory name' + ); } sub uploads_for {