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 ok(! system("rm -rf t/tmp"));
34 writefile("test.setup", "t/tmp", <<EOF
35 # IkiWiki::Setup::Yaml - YAML formatted setup file
36 wikiname: this is the name of my wiki
40 cgiurl: http://localhost/ikiwiki.cgi
41 cgi_wrapper: t/tmp/ikiwiki.cgi
45 - excessiveenvironment
47 ENV: { 'PERL5LIB': 't/tmp:blib/lib:blib/arch' }
51 writefile("index.mdwn", "t/tmp/in", "");
53 writefile("IkiWiki/Plugin/excessiveenvironment.pm", "t/tmp", <<'EOF'
55 package IkiWiki::Plugin::excessiveenvironment;
61 hook(type => "getsetup", id => "excessiveenvironment", call => \&getsetup);
62 hook(type => "genwrapper", id => "excessiveenvironment", call => \&genwrapper);
75 foreach my $j (1..4096) {
76 push @ret, qq{addenv("VAR$j", "val$j");\n};
86 ok(! system(@command, qw(--setup t/tmp/test.setup --rebuild --wrappers)), "run ikiwiki");
87 ok(run(["./t/tmp/ikiwiki.cgi"], '<&-', '>', \$stdout, init => sub {
88 $ENV{HTTP_HOST} = "localhost";
89 $ENV{QUERY_STRING} = "do=prefs";
90 $ENV{REQUEST_METHOD} = "GET";
91 $ENV{SCRIPT_NAME} = "/cgi-bin/ikiwiki.cgi";
92 $ENV{SERVER_PORT} = "80"