File: value.t

package info (click to toggle)
libapache-admin-config-perl 0.94-1.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, stretch, wheezy
  • size: 184 kB
  • ctags: 69
  • sloc: perl: 858; makefile: 3
file content (31 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
use strict;
use Test;
plan test => 40;

use Apache::Admin::Config;
ok(1);

my $conf = new Apache::Admin::Config;


foreach my $type (qw(section directive comment))
{
    my $item = $conf->add($type, test=>"test");
    ok(defined $item);
    ok($item eq 'test');
    ok($item ne 'tset');
    $item->value(40);
    ok($item == 40);
    ok($item != 20);
    $item->value('test');
    ok($item->value eq 'test');
    my $item2 = $conf->select($type, -value=>'test');
    ok(defined $item2);
    ok($item2 eq 'test');
    ok($item2->value eq 'test');
    $item2->set_value('test_change');
    ok($item2 eq 'test_change');
    ok($item2->value eq 'test_change');
    ok($item eq 'test_change');
    ok($item->value eq 'test_change');
}