6 plan(skip_all => "IPC::Run not available")
17 my $installed = $ENV{INSTALLED_TESTS};
21 @command = qw(env PERL5LIB=t/tmp ikiwiki);
24 ok(! system("make -s ikiwiki.out"));
25 @command = qw(env PERL5LIB=t/tmp:blib/lib:blib/arch perl -I. ./ikiwiki.out
26 --underlaydir=underlays/basewiki
27 --set underlaydirbase=underlays
28 --templatedir=templates);
31 writefile("test.setup", "t/tmp", <<EOF
32 # IkiWiki::Setup::Yaml - YAML formatted setup file
33 wikiname: this is the name of my wiki
37 cgiurl: http://localhost/ikiwiki.cgi
38 cgi_wrapper: t/tmp/ikiwiki.cgi
42 - excessiveenvironment
44 ENV: { 'PERL5LIB': 't/tmp:blib/lib:blib/arch' }
48 writefile("index.mdwn", "t/tmp/in", "");
50 writefile("IkiWiki/Plugin/excessiveenvironment.pm", "t/tmp", <<'EOF'
52 package IkiWiki::Plugin::excessiveenvironment;
58 hook(type => "getsetup", id => "excessiveenvironment", call => \&getsetup);
59 hook(type => "genwrapper", id => "excessiveenvironment", call => \&genwrapper);
72 foreach my $j (1..4096) {
73 push @ret, qq{addenv("VAR$j", "val$j");\n};
83 ok(! system(@command, qw(--setup t/tmp/test.setup --rebuild --wrappers)), "run ikiwiki");
84 ok(run(["./t/tmp/ikiwiki.cgi"], '<&-', '>', \$stdout, init => sub {
85 $ENV{HTTP_HOST} = "localhost";
86 $ENV{QUERY_STRING} = "do=prefs";
87 $ENV{REQUEST_METHOD} = "GET";
88 $ENV{SCRIPT_NAME} = "/cgi-bin/ikiwiki.cgi";
89 $ENV{SERVER_PORT} = "80"