File: comment_delete.t

package info (click to toggle)
libapache-admin-config-perl 0.95-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 858; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 474 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_comment('test1');
$conf->add_comment('test2');
$conf->add_comment('test3');
$conf->add_comment('test4');
$conf->add_comment('test5');
$conf->add_comment('test6');

ok($conf->comment('test3')->first_line, 3);
ok($conf->comment('test4')->first_line, 4);

$conf->comment('test3')->delete;
ok($conf->comment('test4')->first_line, 3);