use FindBin '$Bin';
use lib "$Bin/lib";
-use Test::More tests => 2;
+use Test::More tests => 3;
# Test configurable path root and dir
{ package root_test;
is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File 2');
}
+
+# test yet another variation on specifying the root path
+{ package root_test_3;
+
+ use Test::More;
+ use HTTP::Request::Common;
+ use Catalyst::Test 'TestCGIBinRoot3';
+
+ my $response = request POST '/cgi/path/test.pl', [
+ foo => 'bar',
+ bar => 'baz'
+ ];
+
+ is($response->content, 'foo:bar bar:baz', 'POST to Perl CGI File 3');
+}
--- /dev/null
+package TestCGIBinRoot3;
+
+use Catalyst::Runtime '5.70';
+use parent 'Catalyst';
+
+__PACKAGE__->setup(qw/Static::Simple/);
+
+1;
--- /dev/null
+package TestCGIBinRoot3::Controller::CGIHandler;
+
+use parent 'Catalyst::Controller::CGIBin';
+
+__PACKAGE__->config(
+ cgi_root_path => 'cgi',
+ cgi_dir => TestCGIBinRoot3->path_to('root','cgi'),
+ );
+
+
+1;
--- /dev/null
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use CGI ':standard';
+
+die '$ENV{MOD_PERL} must not be set' if $ENV{MOD_PERL};
+
+print header;
+print 'foo:',param('foo'),' bar:',param('bar')