File: basic.t

package info (click to toggle)
libkeyword-simple-perl 0.04-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 116 kB
  • sloc: perl: 128; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (2)
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
#!perl
use warnings FATAL => 'all';
use strict;

use Test::More tests => 2;

{
    package Foo;

    use Keyword::Simple;

    sub import {
        Keyword::Simple::define peek => sub {
            substr ${$_[0]}, 0, 0, "ok 1, 'synthetic test';";
        };
    }

    sub unimport {
        Keyword::Simple::undefine 'peek';
    }

    BEGIN { $INC{"Foo.pm"} = 1; }
}

use Foo;

peek
ok 1, "natural test";