File: section_delete.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 (23 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use Test;
plan test => 5;

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

my $conf = new Apache::Admin::Config;
ok(defined $conf);

$conf->add_section(test=>1);
$conf->add_section(test=>2);
$conf->add_section(test=>3);
$conf->add_section(test=>4);
$conf->add_section(test=>5);
$conf->add_section(test2=>6);

ok($conf->section(test=>3)->first_line, 5);
ok($conf->section(test=>4)->first_line, 7);

$conf->section(test=>3)->delete;
ok($conf->section(test=>4)->first_line, 5);