File: constants.t

package info (click to toggle)
libbusiness-isbn-perl 3.003-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,412 kB
  • ctags: 89
  • sloc: perl: 647; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 672 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
use Test::More 'no_plan';

require_ok( 'Business::ISBN' );

can_ok( 'Business::ISBN', 'import' );

ok( %Business::ISBN::EXPORT_TAGS );
ok( exists $Business::ISBN::EXPORT_TAGS{'all'} );

isa_ok( $Business::ISBN::EXPORT_TAGS{'all'}, ref [] );

ok( defined Business::ISBN->import( ':all' ) );

foreach my $sub ( qw( INVALID_GROUP_CODE INVALID_PUBLISHER_CODE BAD_CHECKSUM
	GOOD_ISBN BAD_ISBN )
	) {
	no strict 'refs';
	
	ok( defined &{$sub}, "Constant '$sub' is defined" );
	}

__END__
sub INVALID_GROUP_CODE     () { -2 };
sub INVALID_PUBLISHER_CODE () { -3 };
sub BAD_CHECKSUM           () { -1 };
sub GOOD_ISBN              () {  1 };
sub BAD_ISBN               () {  0 };