File: test_class_most.t

package info (click to toggle)
libperl-prereqscanner-notquitelite-perl 0.9917-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 944 kB
  • sloc: perl: 5,239; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 875 bytes parent folder | download | duplicates (3)
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
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/../";
use Test::More;
use t::Util;

# taken from Test::Class::Most pod
test('parent with a package', <<'END', {'Test::Class::Most' => 0, 'Tests::For::Foo' => 0});
package Tests::For::Foo::Child;
use Test::Class::Most parent => 'Tests::For::Foo';
END

test('parent with packages', <<'END', {'Test::Class::Most' => 0, 'Tests::For::Foo' => 0, 'Tests::For::Bar' => 0, 'Some::Other::Class::For::Increased::Stupidity' => 0});
package Tests::For::ISuckAtOO;
use Test::Class::Most parent => [qw/
   Tests::For::Foo
   Tests::For::Bar
   Some::Other::Class::For::Increased::Stupidity
/];
END

test('with other options', <<'END', {'Test::Class::Most' => 0, 'My::Test::Class' => 0});
use Test::Class::Most 
   parent      => 'My::Test::Class',
   attributes  => [qw/customer items/],
   is_abstract => 1;
END

done_testing;