File: 03errors.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 (43 lines) | stat: -rw-r--r-- 833 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
35
36
37
38
39
40
41
42
43
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 => 3,
	 todo => [],
	 onfail => sub {},
	);
}

# test 1
# Bad first parameter
BEGIN {
    eval <<'END';
    use Inline 'Bogus' => 'code';
END
    ok($@ =~ /\QYou have specified 'Bogus' as an Inline programming language.

I currently only know about the following languages:/);
}

# test 2
# Bad shortcut
BEGIN {
    eval <<'END';
    use Inline 'force', 'hocum';
END
    ok($@ =~ /\Q${\ Inline::M48_usage_shortcuts('hocum')}/);
}

# test 3
# Bad config option
BEGIN {
    eval <<'END';
    require Inline::Foo;
    use Inline Foo => 'xxx' => ENABLE => 'BOGUM';
END
    ok($@ =~ Inline::Foo::usage_config('BOGUM'));
}