File: 004_version.t

package info (click to toggle)
libmodule-optional-perl 0.03-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 140 kB
  • sloc: perl: 102; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 577 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
# -*- perl -*-

# t/004_version.t - Test optional module with version number

use Test::More tests => 6;
use strict;

BEGIN { 
#01	
	use_ok( 'Params::Validate::Dummy', qw());
	# Force dummied P::V to be used
#02
	use_ok( 'Module::Optional', 'Params::Validate', 9.99 ); }

#03
can_ok('Params::Validate', 'validate');

#04
can_ok('Params::Validate', 'validate_pos');

my @args = qw(foo bar);

#05
is_deeply([validate_pos(@args, 1,1,1)], \@args, "validate_pos passed thru");

@args = ( foo=>1, bar=>2);

#06
is_deeply([validate(@args, {foo => 1})], \@args, "validate pass thru");