File: custom.t

package info (click to toggle)
libsoftware-license-perl 0.103004-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 908 kB
  • sloc: perl: 6,173; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download | duplicates (7)
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
44
#!perl
use strict;
use warnings;

use Test::More;

use Software::License::Custom;

my $slc = Software::License::Custom->new({
   holder => 'A. U. Thor',
   year   => 1972,
   filename => 't/custom-license'
});
isa_ok($slc, 'Software::License');

is($slc->name, 'The Foo-Bar License', 'name');
is($slc->url, 'http://www.example.com/foo-bar.txt', 'url');
is($slc->meta_name, 'foo_bar_meta', 'meta_name');
is($slc->meta2_name, 'foo_bar_meta2', 'meta2_name');
is($slc->notice, <<'END_OF_NOTICE', 'notice');
Copyright (C) 1972 by A. U. Thor.

This is free software, licensed under The Foo-Bar License.
END_OF_NOTICE
is($slc->license, <<'END_OF_LICENSE', 'license');
              The Foo-Bar License

Well... this is only some sample text. I'm true... only sample text!!!

Yes, spanning more lines and more paragraphs.
END_OF_LICENSE
is($slc->fulltext, <<'END_OF_FULLTEXT', 'fulltext');
Copyright (C) 1972 by A. U. Thor.

This is free software, licensed under The Foo-Bar License.

              The Foo-Bar License

Well... this is only some sample text. I'm true... only sample text!!!

Yes, spanning more lines and more paragraphs.
END_OF_FULLTEXT

done_testing;