From: Nick J. <nje...@us...> - 2002-03-08 07:02:57
|
Update of /cvsroot/sandweb/sandweb/t In directory usw-pr-cvs1:/tmp/cvs-serv26998 Added Files: basics.cfg basics.t Log Message: * added initial tests, incomplete. --- NEW FILE --- <!-- SandWeb XML Config File --> <config> <!-- config tree for logging behavior --> <logging debug="0" log="0" /> <!-- config for paths to sandweb data files --> <paths template_dir="../templates" data_dir="var/data" log_dir="var/log" work_dir="var/work" users_dir="var/users" /> <!-- config for cgi related information --> <cgi-bin cgi_path="/cgi-bin/sandweb/bin" cgi_domain="" /> <!-- cookie related settings (default values should work) --> <cookie cookie_path="" cookie_domain="" /> <display bgcolor="blue" text="black" border="green" /> <webserver mime-types_location="/usr/local/apache/conf" mime-types_file="mime.types" /> </config> --- NEW FILE --- use Test; BEGIN { plan tests => 5, todo => [3,4,5] } # test case 1 eval { require SandWeb; return 1; }; ok($@, ''); croak() if $@; # if SandWeb didn't load. you gots problems # prepare my $config_file = 'basics.cfg'; my $config_dir = 't'; # object creation, all objects global throughout CGI my %return = SandWeb::->start_up( config_dir => $config_dir, config_file => $config_file, ); ok($return{'errlev'}); my $log = $return{'data'}->{'log'}; my $ui = $return{'data'}->{'ui'}; my $auth = $return{'data'}->{'auth'}; # test case 2 ok($auth->login( 'username' => 'foo', 'password' => 'bar', )); |