summaryrefslogtreecommitdiff
path: root/t/06locus05.t
blob: ea82674154f588eaa7ddab94ac70cef1f1777fc9 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- perl -*-
use lib qw(t lib);
use strict;
use Test;
plan test => 3;

use TestPreproc;

my $obj = new TestPreproc -expand => ['locus', 'ifdefine'];
ok($obj->dump_reformat_synclines, $obj->dump_expect);

$obj = new TestPreproc -expand => [ 'locus', { ifdefine => [qw(VAR)] } ];
ok($obj->dump_reformat_synclines, $obj->dump_expect);

$obj = new TestPreproc -expand => ['locus', 'ifdefine'];
ok($obj->dump_reformat_synclines, $obj->dump_expect);

__DATA__
!>httpd.conf
ServerAdmin foo
<IfDefine VAR>
  ServerName localhost
</IfDefine>
!=
# {{$server_root/httpd.conf}}:1
ServerAdmin foo
!$
__END__
!>httpd.conf
ServerAdmin foo
<IfDefine VAR>
  ServerName localhost
</IfDefine>
!=
# {{$server_root/httpd.conf}}:1
ServerAdmin foo
# {{$server_root/httpd.conf}}:3
ServerName localhost
!$
__END__
!>httpd.conf
ServerAdmin foo
<IfDefine !VAR>
  ServerName localhost
</IfDefine>
!=
# {{$server_root/httpd.conf}}:1
ServerAdmin foo
# {{$server_root/httpd.conf}}:3
ServerName localhost
!$

Return to:

Send suggestions and report system problems to the System administrator.