[Lxr-commits] CVS: lxr/tests ConfigTest.pm,1.1,1.2
Brought to you by:
ajlittoz
From: Malcolm B. <mb...@us...> - 2004-09-06 21:54:56
|
Update of /cvsroot/lxr/lxr/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28503 Modified Files: ConfigTest.pm Log Message: Fix test to work correctly Index: ConfigTest.pm =================================================================== RCS file: /cvsroot/lxr/lxr/tests/ConfigTest.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ConfigTest.pm 4 Mar 2002 15:11:27 -0000 1.1 +++ ConfigTest.pm 6 Sep 2004 21:54:45 -0000 1.2 @@ -31,14 +31,14 @@ my $self = shift; $self->assert($self->{config}->swishindex eq '/test/lxr/bin/swish-e', "swishindex read failed"); - $self->assert($self->{config}->baseurl eq 'http://test/lxr', - "Config accessed wrong baseurl"); + $self->assert($self->{config}->baseurl eq 'http://test/lxr/', + "Config accessed wrong baseurl " . $self->{config}->baseurl); } # test access to the variables section sub test_variables { my $self = shift; - $self->assert($self->{config}->variable('v') == '1.0.6', + $self->assert($self->{config}->variable('v') eq '1.0.6', "Variable default not correct"); $self->assert(($self->{config}->varrange('v'))[1] =~ /hi hippy/, "Variable value missing"); @@ -49,7 +49,7 @@ my @vars = $self->{config}->allvariables(); $self->assert(grep {$_ eq 'v'} @vars, "allvariables didn't return v"); $self->assert(grep {$_ eq 'a'} @vars, "allvariables didn't return a"); - $self->assert($#vars == 2, "Too many variables returned"); + $self->assert($#vars == 1, "Too many variables returned got " . $self->{config}->allvariables()); } |