~ubuntu-branches/ubuntu/natty/lxr-cvs/natty

« back to all changes in this revision

Viewing changes to tests/ConfigTest.pm

  • Committer: Bazaar Package Importer
  • Author(s): Giacomo Catenazzi
  • Date: 2006-02-24 07:52:13 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060224075213-2fn6kna2y9p3l65m
Tags: 0.9.4-1
* WARNING: see /usr/share/doc/lxr-cvs/README.Debian if you upgrade
  from an old verion (0.9.2 and previous), because of some changes
  in configuration and structure
* New upstream release (Closes: #310729)
* Moved configuration files in /etc/lxr and binary files in /usr/bin
  (Closes: #326467).
* Some small updates (policy, debhelper, ...)
* Support for mysql 5.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        my $self = shift;
32
32
        $self->assert($self->{config}->swishindex eq '/test/lxr/bin/swish-e',
33
33
                   "swishindex read failed");
34
 
        $self->assert($self->{config}->baseurl eq 'http://test/lxr',
35
 
                   "Config accessed wrong baseurl");
 
34
        $self->assert($self->{config}->baseurl eq 'http://test/lxr/',
 
35
                   "Config accessed wrong baseurl " . $self->{config}->baseurl);
36
36
}
37
37
 
38
38
# test access to the variables section
39
39
sub test_variables {
40
40
        my $self = shift;
41
 
        $self->assert($self->{config}->variable('v') == '1.0.6',
 
41
        $self->assert($self->{config}->variable('v') eq '1.0.6',
42
42
                   "Variable default not correct");
43
43
        $self->assert(($self->{config}->varrange('v'))[1] =~ /hi hippy/,
44
44
                   "Variable value missing");
49
49
        my @vars = $self->{config}->allvariables();
50
50
    $self->assert(grep {$_ eq 'v'} @vars, "allvariables didn't return v");
51
51
        $self->assert(grep {$_ eq 'a'} @vars, "allvariables didn't return a");
52
 
        $self->assert($#vars == 2, "Too many variables returned");
 
52
        $self->assert($#vars == 1, "Too many variables returned got " . $self->{config}->allvariables());
53
53
}
54
54
 
55
55