File: 04create.t

package info (click to toggle)
libinline-perl 0.86-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 504 kB
  • sloc: perl: 3,147; sh: 57; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 450 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
use strict; use warnings;
use lib -e 't' ? 't' : 'test';
use TestInlineSetup;

use Test::More tests => 1;

BEGIN {
    delete $ENV{PERL_INLINE_DIRECTORY};
    delete $ENV{HOME};
}

# Make sure Inline can generate a new _Inline/ directory.
# (But make sure it's in our own space.)
use Inline Config => DIRECTORY => $TestInlineSetup::DIR;
use Inline 'Foo';
ok(add(3, 7) == 10, 'in own DID');

__END__

__Foo__
foo-sub add { foo-return $_[0] + $_[1]; }