File: 02config.t

package info (click to toggle)
libinline-perl 0.44-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 440 kB
  • ctags: 121
  • sloc: perl: 3,768; makefile: 38
file content (34 lines) | stat: -rw-r--r-- 659 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
24
25
26
27
28
29
30
31
32
33
34
use File::Spec;
use lib (File::Spec->catdir(File::Spec->curdir(),'blib','lib'), File::Spec->curdir());
use strict;
use Test;
use diagnostics;
use Inline Config => DIRECTORY => '_Inline_test';

BEGIN {
    plan(tests => 2,
	 todo => [],
	 onfail => sub {},
	);
}

# test 1
# Make sure ENABLE works
ok(test1('test1'));
use Inline Foo => <<'END_OF_FOO', ENABLE => 'BAR';
foo-sub test1 {
    bar-return $_[0] bar-eq 'test1';
}
END_OF_FOO

# test 2
# Make sure PATTERN works
ok(test2('test2'));
use Inline Foo => Config => ENABLE => 'BAR';
use Inline Foo => <<'END_OF_FOO', PATTERN => 'gogo-';
gogo-sub test2 {
    bar-return $_[0] gogo-eq 'test2';
}
END_OF_FOO