From: Mischa POSLAWSKY Date: Mon, 30 Apr 2012 20:23:22 +0000 (+0200) Subject: t/50-cgi: encode special chars in file names X-Git-Tag: 3.24~8 X-Git-Url: http://git.shiar.net/perl/plp/.git/commitdiff_plain/39e0e00b61b6910de1313ca83efa9f1c3b092650 t/50-cgi: encode special chars in file names Some characters may be disallowed on different (file) systems (such as colons on Windows). --- diff --git a/t/50-cgi.t b/t/50-cgi.t index f58566f..0f3eeaf 100644 --- a/t/50-cgi.t +++ b/t/50-cgi.t @@ -5,6 +5,7 @@ use Cwd; use File::Basename qw( dirname ); use File::Spec; use Test::More; +use PLP::Functions qw( DecodeURI ); eval { require Test::LongString; @@ -105,6 +106,7 @@ sub plp_ok { my $infile = delete $replace{-input} // "$name.plp"; my $addin = -e "$name.txt" && "$name.txt"; $name =~ s/^(\d*)-// and $name .= " ($1)"; + DecodeURI($name); my $out = eval { local $/ = undef; # slurp diff --git a/t/50-cgi/01-404 not found.html b/t/50-cgi/01-404+not+found.html similarity index 100% rename from t/50-cgi/01-404 not found.html rename to t/50-cgi/01-404+not+found.html diff --git a/t/50-cgi/05-403 permission denied.html b/t/50-cgi/05-403+permission+denied.html similarity index 100% rename from t/50-cgi/05-403 permission denied.html rename to t/50-cgi/05-403+permission+denied.html diff --git a/t/50-cgi/12-<:=.html b/t/50-cgi/12-%3c%3a%3d.html similarity index 100% rename from t/50-cgi/12-<:=.html rename to t/50-cgi/12-%3c%3a%3d.html diff --git a/t/50-cgi/12-<:=.plp b/t/50-cgi/12-%3c%3a%3d.plp similarity index 100% rename from t/50-cgi/12-<:=.plp rename to t/50-cgi/12-%3c%3a%3d.plp diff --git a/t/50-cgi/20-no warnings by default.html b/t/50-cgi/20-no+warnings+by+default.html similarity index 100% rename from t/50-cgi/20-no warnings by default.html rename to t/50-cgi/20-no+warnings+by+default.html diff --git a/t/50-cgi/20-no warnings by default.plp b/t/50-cgi/20-no+warnings+by+default.plp similarity index 100% rename from t/50-cgi/20-no warnings by default.plp rename to t/50-cgi/20-no+warnings+by+default.plp diff --git a/t/50-cgi/29-fatal error.html b/t/50-cgi/29-fatal+error.html similarity index 100% rename from t/50-cgi/29-fatal error.html rename to t/50-cgi/29-fatal+error.html diff --git a/t/50-cgi/29-fatal error.plp b/t/50-cgi/29-fatal+error.plp similarity index 100% rename from t/50-cgi/29-fatal error.plp rename to t/50-cgi/29-fatal+error.plp diff --git a/t/50-cgi/31-$PLP::ERROR.html b/t/50-cgi/31-%24PLP%3a%3aERROR.html similarity index 100% rename from t/50-cgi/31-$PLP::ERROR.html rename to t/50-cgi/31-%24PLP%3a%3aERROR.html diff --git a/t/50-cgi/31-$PLP::ERROR.plp b/t/50-cgi/31-%24PLP%3a%3aERROR.plp similarity index 100% rename from t/50-cgi/31-$PLP::ERROR.plp rename to t/50-cgi/31-%24PLP%3a%3aERROR.plp diff --git a/t/50-cgi/32-$PLP::DEBUG.html b/t/50-cgi/32-%24PLP%3a%3aDEBUG.html similarity index 100% rename from t/50-cgi/32-$PLP::DEBUG.html rename to t/50-cgi/32-%24PLP%3a%3aDEBUG.html diff --git a/t/50-cgi/32-$PLP::DEBUG.plp b/t/50-cgi/32-%24PLP%3a%3aDEBUG.plp similarity index 100% rename from t/50-cgi/32-$PLP::DEBUG.plp rename to t/50-cgi/32-%24PLP%3a%3aDEBUG.plp diff --git a/t/50-cgi/42-apache %ENV.html b/t/50-cgi/42-apache+%25ENV.html similarity index 100% rename from t/50-cgi/42-apache %ENV.html rename to t/50-cgi/42-apache+%25ENV.html diff --git a/t/50-cgi/42-apache %ENV.plp b/t/50-cgi/42-apache+%25ENV.plp similarity index 100% rename from t/50-cgi/42-apache %ENV.plp rename to t/50-cgi/42-apache+%25ENV.plp diff --git a/t/50-cgi/50-%get.html b/t/50-cgi/50-%25get.html similarity index 100% rename from t/50-cgi/50-%get.html rename to t/50-cgi/50-%25get.html diff --git a/t/50-cgi/50-%get.plp b/t/50-cgi/50-%25get.plp similarity index 100% rename from t/50-cgi/50-%get.plp rename to t/50-cgi/50-%25get.plp diff --git a/t/50-cgi/51-%get array.html b/t/50-cgi/51-%25get+array.html similarity index 100% rename from t/50-cgi/51-%get array.html rename to t/50-cgi/51-%25get+array.html diff --git a/t/50-cgi/51-%get array.plp b/t/50-cgi/51-%25get+array.plp similarity index 100% rename from t/50-cgi/51-%get array.plp rename to t/50-cgi/51-%25get+array.plp diff --git a/t/50-cgi/55-%header.html b/t/50-cgi/55-%25header.html similarity index 100% rename from t/50-cgi/55-%header.html rename to t/50-cgi/55-%25header.html diff --git a/t/50-cgi/55-%header.plp b/t/50-cgi/55-%25header.plp similarity index 100% rename from t/50-cgi/55-%header.plp rename to t/50-cgi/55-%25header.plp diff --git a/t/50-cgi/56-%header repetition.html b/t/50-cgi/56-%25header+repetition.html similarity index 100% rename from t/50-cgi/56-%header repetition.html rename to t/50-cgi/56-%25header+repetition.html diff --git a/t/50-cgi/56-%header repetition.plp b/t/50-cgi/56-%25header+repetition.plp similarity index 100% rename from t/50-cgi/56-%header repetition.plp rename to t/50-cgi/56-%25header+repetition.plp diff --git a/t/50-cgi/60-empty %post.html b/t/50-cgi/60-empty+%25post.html similarity index 100% rename from t/50-cgi/60-empty %post.html rename to t/50-cgi/60-empty+%25post.html diff --git a/t/50-cgi/60-empty %post.plp b/t/50-cgi/60-empty+%25post.plp similarity index 100% rename from t/50-cgi/60-empty %post.plp rename to t/50-cgi/60-empty+%25post.plp diff --git a/t/50-cgi/61-%post set.html b/t/50-cgi/61-%25post+set.html similarity index 100% rename from t/50-cgi/61-%post set.html rename to t/50-cgi/61-%25post+set.html diff --git a/t/50-cgi/61-%post set.plp b/t/50-cgi/61-%25post+set.plp similarity index 100% rename from t/50-cgi/61-%post set.plp rename to t/50-cgi/61-%25post+set.plp diff --git a/t/50-cgi/62-%post data.html b/t/50-cgi/62-%25post+data.html similarity index 100% rename from t/50-cgi/62-%post data.html rename to t/50-cgi/62-%25post+data.html diff --git a/t/50-cgi/62-%post data.plp b/t/50-cgi/62-%25post+data.plp similarity index 100% rename from t/50-cgi/62-%post data.plp rename to t/50-cgi/62-%25post+data.plp diff --git a/t/50-cgi/62-%post data.txt b/t/50-cgi/62-%25post+data.txt similarity index 100% rename from t/50-cgi/62-%post data.txt rename to t/50-cgi/62-%25post+data.txt diff --git a/t/50-cgi/80-lighttpd %ENV.html b/t/50-cgi/80-lighttpd+%25ENV.html similarity index 100% rename from t/50-cgi/80-lighttpd %ENV.html rename to t/50-cgi/80-lighttpd+%25ENV.html diff --git a/t/50-cgi/80-lighttpd %ENV.plp b/t/50-cgi/80-lighttpd+%25ENV.plp similarity index 100% rename from t/50-cgi/80-lighttpd %ENV.plp rename to t/50-cgi/80-lighttpd+%25ENV.plp