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),
26 "-I".getcwd, qw(./ikiwiki.out
27 --underlaydir=underlays/basewiki
28 --set underlaydirbase=underlays
29 --templatedir=templates));
32 writefile("test.setup", "t/tmp", <<EOF
33 # IkiWiki::Setup::Yaml - YAML formatted setup file
34 wikiname: this is the name of my wiki
38 cgiurl: http://localhost/ikiwiki.cgi
39 cgi_wrapper: t/tmp/ikiwiki.cgi
43 - excessiveenvironment
45 ENV: { 'PERL5LIB': 't/tmp:blib/lib:blib/arch' }
49 writefile("index.mdwn", "t/tmp/in", "");
51 writefile("IkiWiki/Plugin/excessiveenvironment.pm", "t/tmp", <<'EOF'
53 package IkiWiki::Plugin::excessiveenvironment;
59 hook(type => "getsetup", id => "excessiveenvironment", call => \&getsetup);
60 hook(type => "genwrapper", id => "excessiveenvironment", call => \&genwrapper);
73 foreach my $j (1..4096) {
74 push @ret, qq{addenv("VAR$j", "val$j");\n};
84 ok(! system(@command, qw(--setup t/tmp/test.setup --rebuild --wrappers)), "run ikiwiki");
85 ok(run(["./t/tmp/ikiwiki.cgi"], '<&-', '>', \$stdout, init => sub {
86 $ENV{HTTP_HOST} = "localhost";
87 $ENV{QUERY_STRING} = "do=prefs";
88 $ENV{REQUEST_METHOD} = "GET";
89 $ENV{SCRIPT_NAME} = "/cgi-bin/ikiwiki.cgi";
90 $ENV{SERVER_PORT} = "80"