File: Simple.t

package info (click to toggle)
libimporter-perl 0.026-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 236 kB
  • sloc: perl: 509; makefile: 2
file content (32 lines) | stat: -rw-r--r-- 717 bytes parent folder | download | duplicates (4)
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
package Importer::Test;
use strict;
use warnings;

{
    package main;
    use Importer '0.001', 'Test::More';
}

use Importer 0.001, 'Test::More' => qw/0.88 pass ok $TODO/;
use Importer 'Data::Dumper';

pass("Loaded Test::More");

our $ok = 'ok';
our %ok = ( 1 => 1 );
our @ok = qw/o k/;
ok(1, "imported ok");

ok(eval '$TODO = undef; 1', '$TODO was imported') || Test::More::diag($@);

no Importer;

::ok(!__PACKAGE__->can($_), "removed sub $_") for qw/pass ok Dumper/;

::ok(eval '$TODO = undef; 1', '$TODO was not removed') || Test::More::diag($@);

::is($ok, 'ok', 'did not remove $ok');
::is_deeply(\%ok, {1 => 1}, 'Did not remove %ok' );
::is_deeply(\@ok, [qw/o k/], 'Did not remove @ok' );

::done_testing();