C::C::WrapCGI - PATH_INFO and configurable cgi_dir
[catagits/Catalyst-Controller-WrapCGI.git] / t / lib / TestApp / Controller / Root.pm
index 9ca47ce..c1729e7 100644 (file)
@@ -16,4 +16,34 @@ sub handle_cgi : Path('/cgi-bin/test.cgi') {
     $self->cgi_to_response($c, $cgi);
 }
 
+sub test_path_info : Path('/cgi-bin/test_pathinfo.cgi') {
+    my ($self, $c) = @_;
+
+    $self->cgi_to_response($c, sub {
+        my $cgi = CGI->new;
+        print $cgi->header;
+        print $ENV{PATH_INFO}
+    });
+}
+
+sub test_filepath_info : Path('/cgi-bin/test_filepathinfo.cgi') {
+    my ($self, $c) = @_;
+
+    $self->cgi_to_response($c, sub {
+        my $cgi = CGI->new;
+        print $cgi->header;
+        print $ENV{FILEPATH_INFO}
+    });
+}
+
+sub test_script_name : Path('/cgi-bin/test_scriptname.cgi') {
+    my ($self, $c) = @_;
+
+    $self->cgi_to_response($c, sub {
+        my $cgi = CGI->new;
+        print $cgi->header;
+        print $ENV{SCRIPT_NAME}
+    });
+}
+
 1;