6 use Test
::More tests
=> 8;
12 my $msock = start_server
();
13 ok
($msock, "manage sock");
15 ok
(manage
("LOAD Include"), "load include");
19 my $port = new_port
();
22 CREATE SERVICE test_
$_
23 SET test_
$_.role
= web_server
24 SET test_
$_.listen = 127.0.0.1:$port
25 SET test_
$_.docroot
= $dir
26 SET test_
$_.dirindexing
= 0
27 SET test_
$_.persist_client
= 1
31 open(F
, ">$dir/$_.conf") or die "Couldn't open $dir/$_.conf: $!\n";
36 ok
(manage
("INCLUDE = $dir/a.conf"), "include single");
38 ok
(manage
("INCLUDE = $dir/b* $dir/c*"), "include multi");
40 ok
(! manage
("INCLUDE = $dir/d.conf", quiet_failure
=> 1), "error on nonexistent conf");
42 my $s_output = manage_multi
("show SERVICE");
45 like
($s_output, qr/^test_$_ .+ ENABLED/m, "test_$_ loaded");